Compare commits
3
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
48694feeea | ||
|
|
c94f7271e9 | ||
|
|
769bb9d26e |
@@ -1,2 +0,0 @@
|
||||
# Try to tell GitHub how to handle .asc files
|
||||
*.asc linguist-language=Tcl
|
||||
@@ -1,260 +0,0 @@
|
||||
name: Prepare bext dependencies
|
||||
description: Restore a compatible bext production artifact or build the pinned revision.
|
||||
|
||||
inputs:
|
||||
platform-channel:
|
||||
description: Published bext platform channel.
|
||||
required: true
|
||||
source-dir:
|
||||
description: Absolute path to the BRL-CAD source tree.
|
||||
required: true
|
||||
output-dir:
|
||||
description: Absolute path where the bext dependency tree will be prepared.
|
||||
required: true
|
||||
build-type:
|
||||
description: BRL-CAD build configuration that will consume the dependency tree.
|
||||
required: false
|
||||
default: Release
|
||||
artifact-token:
|
||||
description: Token with Actions read access to BRL-CAD/bext.
|
||||
required: false
|
||||
|
||||
outputs:
|
||||
bext-sha:
|
||||
description: The bext revision in the prepared dependency tree.
|
||||
value: ${{ steps.result.outputs.bext-sha }}
|
||||
source:
|
||||
description: Whether preparation used a production artifact, cache, or local build.
|
||||
value: ${{ steps.result.outputs.source }}
|
||||
|
||||
runs:
|
||||
using: composite
|
||||
steps:
|
||||
- name: Resolve bext production artifact
|
||||
id: resolve
|
||||
shell: bash
|
||||
env:
|
||||
BEXT_BUILD_TYPE: ${{ inputs.build-type }}
|
||||
BEXT_CHANNEL: ${{ inputs.platform-channel }}
|
||||
BRLCAD_SOURCE_DIR: ${{ inputs.source-dir }}
|
||||
GH_TOKEN: ${{ inputs.artifact-token }}
|
||||
run: |
|
||||
set -uo pipefail
|
||||
source_dir="$BRLCAD_SOURCE_DIR"
|
||||
if command -v cygpath >/dev/null 2>&1; then
|
||||
source_dir="$(cygpath -u "$source_dir")"
|
||||
fi
|
||||
required_sha="$(awk -F'[()]' '/^[[:space:]]*brlcad_bext_init\([0-9a-fA-F]{40}\)/ { print tolower($2) }' "$source_dir/CMakeLists.txt")"
|
||||
if [[ ! "$required_sha" =~ ^[0-9a-f]{40}$ ]]; then
|
||||
echo "Expected exactly one brlcad_bext_init(<sha>) call in $source_dir/CMakeLists.txt" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
repository='BRL-CAD/bext'
|
||||
marker_name="bext-production-$required_sha"
|
||||
marker_info="$(gh api "repos/$repository/actions/artifacts?name=$marker_name&per_page=100" \
|
||||
--jq '[.artifacts[] | select(.expired == false and .name == "'"$marker_name"'")] | sort_by(.created_at) | last | select(. != null) | [.name, .workflow_run.id] | @tsv' 2>/dev/null)" || marker_info=''
|
||||
|
||||
selected_sha=''
|
||||
run_id=''
|
||||
if [[ -n "$marker_info" ]]; then
|
||||
selected_sha="$required_sha"
|
||||
IFS=$'\t' read -r _ run_id <<< "$marker_info"
|
||||
echo "Found complete bext production artifacts for pinned revision $required_sha."
|
||||
else
|
||||
marker_info="$(gh api "repos/$repository/actions/artifacts?per_page=100" \
|
||||
--jq '[.artifacts[] | select(.expired == false and (.name | test("^bext-production-[0-9a-f]{40}$")))] | sort_by(.created_at) | last | select(. != null) | [.name, .workflow_run.id] | @tsv' 2>/dev/null)" || marker_info=''
|
||||
if [[ -n "$marker_info" ]]; then
|
||||
IFS=$'\t' read -r latest_marker run_id <<< "$marker_info"
|
||||
selected_sha="${latest_marker#bext-production-}"
|
||||
comparison="$(gh api "repos/$repository/compare/$required_sha...$selected_sha" --jq '.status' 2>/dev/null)" || comparison=''
|
||||
if [[ "$comparison" == 'ahead' || "$comparison" == 'identical' ]]; then
|
||||
echo "::warning::Using newer successful bext revision $selected_sha instead of BRL-CAD's pinned revision $required_sha."
|
||||
else
|
||||
selected_sha=''
|
||||
run_id=''
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
artifact_ready=false
|
||||
artifact_name=''
|
||||
if [[ "$RUNNER_OS" == 'Windows' && "$BEXT_BUILD_TYPE" == 'Debug' ]]; then
|
||||
echo 'Windows Debug requires a Debug bext build; skipping Release production artifacts.'
|
||||
selected_sha=''
|
||||
run_id=''
|
||||
elif [[ -n "$selected_sha" ]]; then
|
||||
artifact_name="bext-$BEXT_CHANNEL-$selected_sha"
|
||||
artifact_count="$(gh api "repos/$repository/actions/runs/$run_id/artifacts?name=$artifact_name&per_page=100" \
|
||||
--jq '[.artifacts[] | select(.expired == false and .name == "'"$artifact_name"'")] | length' 2>/dev/null)" || artifact_count=0
|
||||
if [[ "$artifact_count" == '1' ]]; then
|
||||
artifact_ready=true
|
||||
else
|
||||
selected_sha=''
|
||||
run_id=''
|
||||
artifact_name=''
|
||||
fi
|
||||
fi
|
||||
|
||||
cache_schema=1
|
||||
image_version="${ImageVersion:-unknown}"
|
||||
runner_arch="${RUNNER_ARCH:-unknown}"
|
||||
fallback_cache_key="bext-$cache_schema-$BEXT_CHANNEL-$BEXT_BUILD_TYPE-$required_sha-$image_version-$runner_arch"
|
||||
production_cache_key="bext-$cache_schema-$BEXT_CHANNEL-Release-$selected_sha"
|
||||
if [[ "$artifact_ready" != 'true' ]]; then
|
||||
echo "No compatible production artifact is available; using the cache/build fallback for $required_sha."
|
||||
fi
|
||||
|
||||
echo "required-sha=$required_sha" >> "$GITHUB_OUTPUT"
|
||||
echo "selected-sha=$selected_sha" >> "$GITHUB_OUTPUT"
|
||||
echo "run-id=$run_id" >> "$GITHUB_OUTPUT"
|
||||
echo "artifact-name=$artifact_name" >> "$GITHUB_OUTPUT"
|
||||
echo "artifact-ready=$artifact_ready" >> "$GITHUB_OUTPUT"
|
||||
echo "production-cache-key=$production_cache_key" >> "$GITHUB_OUTPUT"
|
||||
echo "fallback-cache-key=$fallback_cache_key" >> "$GITHUB_OUTPUT"
|
||||
|
||||
- name: Restore production artifact cache
|
||||
if: steps.resolve.outputs.artifact-ready == 'true'
|
||||
id: production-cache
|
||||
uses: actions/cache/restore@v6
|
||||
with:
|
||||
path: ${{ inputs.output-dir }}
|
||||
key: ${{ steps.resolve.outputs.production-cache-key }}
|
||||
|
||||
- name: Download bext production artifact
|
||||
if: steps.resolve.outputs.artifact-ready == 'true' && steps.production-cache.outputs.cache-hit != 'true'
|
||||
id: download
|
||||
shell: bash
|
||||
env:
|
||||
ARTIFACT_NAME: ${{ steps.resolve.outputs.artifact-name }}
|
||||
BEXT_CHANNEL: ${{ inputs.platform-channel }}
|
||||
BEXT_OUTPUT_DIR: ${{ inputs.output-dir }}
|
||||
BEXT_RUN_ID: ${{ steps.resolve.outputs.run-id }}
|
||||
GH_TOKEN: ${{ inputs.artifact-token }}
|
||||
run: |
|
||||
set -uo pipefail
|
||||
output_dir="$BEXT_OUTPUT_DIR"
|
||||
if command -v cygpath >/dev/null 2>&1; then
|
||||
output_dir="$(cygpath -u "$output_dir")"
|
||||
fi
|
||||
download_dir="$RUNNER_TEMP/bext-download-$BEXT_RUN_ID-$BEXT_CHANNEL"
|
||||
cmake -E rm -rf "$download_dir" "$output_dir"
|
||||
cmake -E make_directory "$download_dir" "$output_dir"
|
||||
|
||||
ready=false
|
||||
if gh run download "$BEXT_RUN_ID" --repo BRL-CAD/bext --name "$ARTIFACT_NAME" --dir "$download_dir"; then
|
||||
archive="$download_dir/bext-$BEXT_CHANNEL.tar.gz"
|
||||
if (cd "$output_dir" && cmake -E tar xzf "$archive") && \
|
||||
[[ -d "$output_dir/install" && -d "$output_dir/noinstall" && -f "$output_dir/bext-install-manifest.json" ]]; then
|
||||
ready=true
|
||||
fi
|
||||
fi
|
||||
cmake -E rm -rf "$download_dir"
|
||||
if [[ "$ready" != 'true' ]]; then
|
||||
cmake -E rm -rf "$output_dir"
|
||||
echo '::warning::Unable to download or validate the bext production artifact; using the pinned cache/build fallback.'
|
||||
fi
|
||||
echo "ready=$ready" >> "$GITHUB_OUTPUT"
|
||||
|
||||
- name: Restore fallback bext cache
|
||||
if: steps.production-cache.outputs.cache-hit != 'true' && steps.download.outputs.ready != 'true'
|
||||
id: fallback-cache
|
||||
uses: actions/cache/restore@v6
|
||||
with:
|
||||
path: ${{ inputs.output-dir }}
|
||||
key: ${{ steps.resolve.outputs.fallback-cache-key }}
|
||||
|
||||
- name: Build pinned bext revision
|
||||
if: steps.production-cache.outputs.cache-hit != 'true' && steps.download.outputs.ready != 'true' && steps.fallback-cache.outputs.cache-hit != 'true'
|
||||
shell: bash
|
||||
env:
|
||||
BEXT_BUILD_TYPE: ${{ inputs.build-type }}
|
||||
BEXT_OUTPUT_DIR: ${{ inputs.output-dir }}
|
||||
BEXT_SHA: ${{ steps.resolve.outputs.required-sha }}
|
||||
run: |
|
||||
set -euo pipefail
|
||||
output_dir="$BEXT_OUTPUT_DIR"
|
||||
if command -v cygpath >/dev/null 2>&1; then
|
||||
output_dir="$(cygpath -u "$output_dir")"
|
||||
fi
|
||||
source_dir="$RUNNER_TEMP/bext-src"
|
||||
build_dir="$RUNNER_TEMP/bext-build"
|
||||
cleanup() {
|
||||
cmake -E rm -rf "$source_dir" "$build_dir"
|
||||
}
|
||||
trap cleanup EXIT
|
||||
cleanup
|
||||
cmake -E rm -rf "$output_dir"
|
||||
|
||||
git clone --filter=blob:none https://github.com/BRL-CAD/bext.git "$source_dir"
|
||||
git -C "$source_dir" -c advice.detachedHead=false checkout "$BEXT_SHA"
|
||||
configure_args=(-S "$source_dir" -B "$build_dir" -G Ninja -DENABLE_ALL=ON -DGIT_SHALLOW_CLONE=ON "-DCMAKE_BUILD_TYPE=$BEXT_BUILD_TYPE" "-DCMAKE_INSTALL_PREFIX=$output_dir")
|
||||
if [[ "$RUNNER_OS" == 'Windows' ]]; then
|
||||
configure_args+=(-DCMAKE_C_COMPILER=cl.exe -DCMAKE_CXX_COMPILER=cl.exe)
|
||||
elif [[ "$RUNNER_OS" == 'macOS' ]]; then
|
||||
export CC=clang
|
||||
export CXX=clang++
|
||||
fi
|
||||
cmake "${configure_args[@]}"
|
||||
cmake --build "$build_dir" --config "$BEXT_BUILD_TYPE" --parallel 2
|
||||
|
||||
- name: Validate bext dependency tree
|
||||
shell: bash
|
||||
env:
|
||||
BEXT_OUTPUT_DIR: ${{ inputs.output-dir }}
|
||||
run: |
|
||||
set -euo pipefail
|
||||
output_dir="$BEXT_OUTPUT_DIR"
|
||||
if command -v cygpath >/dev/null 2>&1; then
|
||||
output_dir="$(cygpath -u "$output_dir")"
|
||||
fi
|
||||
[[ -d "$output_dir/install" && -d "$output_dir/noinstall" && -f "$output_dir/bext-install-manifest.json" ]]
|
||||
tool="$output_dir/noinstall/bin/strclear"
|
||||
if [[ "$RUNNER_OS" == 'Windows' ]]; then
|
||||
[[ -f "$tool.exe" ]]
|
||||
else
|
||||
[[ -x "$tool" ]]
|
||||
fi
|
||||
|
||||
- name: Save production artifact cache
|
||||
if: steps.download.outputs.ready == 'true'
|
||||
uses: actions/cache/save@v6
|
||||
with:
|
||||
path: ${{ inputs.output-dir }}
|
||||
key: ${{ steps.resolve.outputs.production-cache-key }}
|
||||
|
||||
- name: Save fallback bext cache
|
||||
if: steps.production-cache.outputs.cache-hit != 'true' && steps.download.outputs.ready != 'true' && steps.fallback-cache.outputs.cache-hit != 'true'
|
||||
uses: actions/cache/save@v6
|
||||
with:
|
||||
path: ${{ inputs.output-dir }}
|
||||
key: ${{ steps.resolve.outputs.fallback-cache-key }}
|
||||
|
||||
- name: Report bext source
|
||||
id: result
|
||||
shell: bash
|
||||
env:
|
||||
ARTIFACT_READY: ${{ steps.resolve.outputs.artifact-ready }}
|
||||
ARTIFACT_SHA: ${{ steps.resolve.outputs.selected-sha }}
|
||||
DOWNLOAD_READY: ${{ steps.download.outputs.ready }}
|
||||
FALLBACK_CACHE_HIT: ${{ steps.fallback-cache.outputs.cache-hit }}
|
||||
PRODUCTION_CACHE_HIT: ${{ steps.production-cache.outputs.cache-hit }}
|
||||
REQUIRED_SHA: ${{ steps.resolve.outputs.required-sha }}
|
||||
run: |
|
||||
if [[ "$PRODUCTION_CACHE_HIT" == 'true' ]]; then
|
||||
source=production-cache
|
||||
elif [[ "$DOWNLOAD_READY" == 'true' ]]; then
|
||||
source=production-artifact
|
||||
elif [[ "$FALLBACK_CACHE_HIT" == 'true' ]]; then
|
||||
source=fallback-cache
|
||||
else
|
||||
source=local-build
|
||||
fi
|
||||
if [[ "$ARTIFACT_READY" == 'true' && ( "$PRODUCTION_CACHE_HIT" == 'true' || "$DOWNLOAD_READY" == 'true' ) ]]; then
|
||||
sha="$ARTIFACT_SHA"
|
||||
else
|
||||
sha="$REQUIRED_SHA"
|
||||
fi
|
||||
echo "source=$source" >> "$GITHUB_OUTPUT"
|
||||
echo "bext-sha=$sha" >> "$GITHUB_OUTPUT"
|
||||
echo "Prepared bext $sha from $source."
|
||||
@@ -1,637 +0,0 @@
|
||||
# BRL-CAD's primary distcheck target runs too long and does too much work to
|
||||
# be suitable as a CI target, even occasionally. To achieve essentially the
|
||||
# same result, we define individual jobs for each distcheck sub-target and
|
||||
# distribute them across five serial queues. To avoid the target list going
|
||||
# stale, this header is followed by jobs generated from the CMake logic.
|
||||
|
||||
name: Distcheck
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
schedule:
|
||||
- cron: '30 3 * * 5'
|
||||
|
||||
jobs:
|
||||
bext:
|
||||
name: Prepare bext
|
||||
runs-on: ubuntu-24.04
|
||||
env:
|
||||
DEBIAN_FRONTEND: noninteractive
|
||||
steps:
|
||||
- name: Setup - CMake
|
||||
uses: lukka/get-cmake@latest
|
||||
|
||||
- name: Install apt dependencies
|
||||
run: |
|
||||
sudo apt-get update
|
||||
# Install X/OpenGL dev pkgs
|
||||
sudo apt-get install xserver-xorg-dev libx11-dev libxi-dev libxext-dev libglu1-mesa-dev libfontconfig-dev
|
||||
# Install tools
|
||||
sudo apt-get install astyle re2c
|
||||
# Install dependency dev pkgs
|
||||
sudo apt-get install zlib1g-dev libpng-dev libjpeg-dev libtiff-dev libeigen3-dev libgdal-dev libassimp-dev libopencv-dev tcl-dev tk-dev
|
||||
# Install XCB/OpenGL dev pkgs for Qt - see:
|
||||
# https://wiki.qt.io/Building_Qt_6_from_Git
|
||||
# https://doc.qt.io/qt-6/linux-requirements.html
|
||||
sudo apt-get install libfontconfig1-dev libfreetype6-dev libx11-dev libx11-xcb-dev libxext-dev libxfixes-dev libxi-dev libxrender-dev libxcb1-dev libxcb-cursor-dev libxcb-glx0-dev libxcb-keysyms1-dev libxcb-image0-dev libxcb-shm0-dev libxcb-icccm4-dev libxcb-sync-dev libxcb-xfixes0-dev libxcb-shape0-dev libxcb-randr0-dev libxcb-render-util0-dev libxcb-util-dev libxcb-xinerama0-dev libxcb-xkb-dev libxcb-xinput-dev libxcb-xrm-dev libxkbcommon-dev libxkbcommon-x11-dev
|
||||
sudo apt-get install libgl-dev
|
||||
sudo apt-get install libinput-dev
|
||||
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v6
|
||||
with:
|
||||
path: brlcad
|
||||
|
||||
- name: Prepare bext dependencies
|
||||
uses: ./brlcad/.github/actions/prepare-bext
|
||||
with:
|
||||
platform-channel: ubuntu-24.04-${{ runner.arch }}-release
|
||||
source-dir: ${{ github.workspace }}/brlcad
|
||||
output-dir: ${{ runner.temp }}/bext_output
|
||||
build-type: Release
|
||||
artifact-token: ${{ secrets.BEXT_ARTIFACT_TOKEN }}
|
||||
|
||||
distcheck-default_build_type:
|
||||
name: distcheck-default_build_type
|
||||
runs-on: ubuntu-24.04
|
||||
needs: [bext]
|
||||
env:
|
||||
DEBIAN_FRONTEND: noninteractive
|
||||
if: ${{ !cancelled() && github.ref == 'refs/heads/main' }}
|
||||
steps:
|
||||
- name: Setup - CMake
|
||||
uses: lukka/get-cmake@latest
|
||||
- name: Install apt dependencies
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install xserver-xorg-dev libx11-dev libxi-dev libxext-dev libglu1-mesa-dev libfontconfig-dev
|
||||
sudo apt-get install astyle re2c
|
||||
sudo apt-get install zlib1g-dev libpng-dev libjpeg-dev libtiff-dev libeigen3-dev libgdal-dev libassimp-dev libopencv-dev tcl-dev tk-dev libgl-dev libinput-dev
|
||||
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v6
|
||||
with:
|
||||
path: brlcad
|
||||
- name: Prepare bext dependencies
|
||||
uses: ./brlcad/.github/actions/prepare-bext
|
||||
with:
|
||||
platform-channel: ubuntu-24.04-${{ runner.arch }}-release
|
||||
source-dir: ${{ github.workspace }}/brlcad
|
||||
output-dir: ${{ runner.temp }}/bext_output
|
||||
build-type: Release
|
||||
artifact-token: ${{ secrets.BEXT_ARTIFACT_TOKEN }}
|
||||
- name: Directory setup
|
||||
run: cmake -E make_directory build_distcheck-default_build_type
|
||||
- name: Configure
|
||||
run: cmake -S brlcad -B build_distcheck-default_build_type -G Ninja -DBRLCAD_EXT_DIR=${{ runner.temp }}/bext_output
|
||||
- name: Build
|
||||
run: cmake --build build_distcheck-default_build_type --target distcheck-default_build_type
|
||||
- name: Log
|
||||
if: always()
|
||||
run: cat build_distcheck-default_build_type/distcheck-default_build_type.log
|
||||
|
||||
distcheck-debug:
|
||||
name: distcheck-debug
|
||||
runs-on: ubuntu-24.04
|
||||
needs: [bext]
|
||||
env:
|
||||
DEBIAN_FRONTEND: noninteractive
|
||||
if: ${{ !cancelled() && github.ref == 'refs/heads/main' }}
|
||||
steps:
|
||||
- name: Setup - CMake
|
||||
uses: lukka/get-cmake@latest
|
||||
- name: Install apt dependencies
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install xserver-xorg-dev libx11-dev libxi-dev libxext-dev libglu1-mesa-dev libfontconfig-dev
|
||||
sudo apt-get install astyle re2c
|
||||
sudo apt-get install zlib1g-dev libpng-dev libjpeg-dev libtiff-dev libeigen3-dev libgdal-dev libassimp-dev libopencv-dev tcl-dev tk-dev libgl-dev libinput-dev
|
||||
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v6
|
||||
with:
|
||||
path: brlcad
|
||||
- name: Prepare bext dependencies
|
||||
uses: ./brlcad/.github/actions/prepare-bext
|
||||
with:
|
||||
platform-channel: ubuntu-24.04-${{ runner.arch }}-release
|
||||
source-dir: ${{ github.workspace }}/brlcad
|
||||
output-dir: ${{ runner.temp }}/bext_output
|
||||
build-type: Release
|
||||
artifact-token: ${{ secrets.BEXT_ARTIFACT_TOKEN }}
|
||||
- name: Directory setup
|
||||
run: cmake -E make_directory build_distcheck-debug
|
||||
- name: Configure
|
||||
run: cmake -S brlcad -B build_distcheck-debug -G Ninja -DCMAKE_BUILD_TYPE=Debug -DBRLCAD_EXT_DIR=${{ runner.temp }}/bext_output
|
||||
- name: Build
|
||||
run: cmake --build build_distcheck-debug --config Debug --target distcheck-debug
|
||||
- name: Log
|
||||
if: always()
|
||||
run: cat build_distcheck-debug/distcheck-debug.log
|
||||
|
||||
distcheck-release:
|
||||
name: distcheck-release
|
||||
runs-on: ubuntu-24.04
|
||||
needs: [bext]
|
||||
env:
|
||||
DEBIAN_FRONTEND: noninteractive
|
||||
if: ${{ !cancelled() && github.ref == 'refs/heads/main' }}
|
||||
steps:
|
||||
- name: Setup - CMake
|
||||
uses: lukka/get-cmake@latest
|
||||
- name: Install apt dependencies
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install xserver-xorg-dev libx11-dev libxi-dev libxext-dev libglu1-mesa-dev libfontconfig-dev
|
||||
sudo apt-get install astyle re2c
|
||||
sudo apt-get install zlib1g-dev libpng-dev libjpeg-dev libtiff-dev libeigen3-dev libgdal-dev libassimp-dev libopencv-dev tcl-dev tk-dev libgl-dev libinput-dev
|
||||
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v6
|
||||
with:
|
||||
path: brlcad
|
||||
- name: Prepare bext dependencies
|
||||
uses: ./brlcad/.github/actions/prepare-bext
|
||||
with:
|
||||
platform-channel: ubuntu-24.04-${{ runner.arch }}-release
|
||||
source-dir: ${{ github.workspace }}/brlcad
|
||||
output-dir: ${{ runner.temp }}/bext_output
|
||||
build-type: Release
|
||||
artifact-token: ${{ secrets.BEXT_ARTIFACT_TOKEN }}
|
||||
- name: Directory setup
|
||||
run: cmake -E make_directory build_distcheck-release
|
||||
- name: Configure
|
||||
run: cmake -S brlcad -B build_distcheck-release -G Ninja -DCMAKE_BUILD_TYPE=Release -DBRLCAD_EXT_DIR=${{ runner.temp }}/bext_output
|
||||
- name: Build
|
||||
run: cmake --build build_distcheck-release --config Release --target distcheck-release
|
||||
- name: Log
|
||||
if: always()
|
||||
run: cat build_distcheck-release/distcheck-release.log
|
||||
|
||||
distcheck-no_unity_debug:
|
||||
name: distcheck-no_unity_debug
|
||||
runs-on: ubuntu-24.04
|
||||
needs: [bext]
|
||||
env:
|
||||
DEBIAN_FRONTEND: noninteractive
|
||||
if: ${{ !cancelled() && github.ref == 'refs/heads/main' }}
|
||||
steps:
|
||||
- name: Setup - CMake
|
||||
uses: lukka/get-cmake@latest
|
||||
- name: Install apt dependencies
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install xserver-xorg-dev libx11-dev libxi-dev libxext-dev libglu1-mesa-dev libfontconfig-dev
|
||||
sudo apt-get install astyle re2c
|
||||
sudo apt-get install zlib1g-dev libpng-dev libjpeg-dev libtiff-dev libeigen3-dev libgdal-dev libassimp-dev libopencv-dev tcl-dev tk-dev libgl-dev libinput-dev
|
||||
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v6
|
||||
with:
|
||||
path: brlcad
|
||||
- name: Prepare bext dependencies
|
||||
uses: ./brlcad/.github/actions/prepare-bext
|
||||
with:
|
||||
platform-channel: ubuntu-24.04-${{ runner.arch }}-release
|
||||
source-dir: ${{ github.workspace }}/brlcad
|
||||
output-dir: ${{ runner.temp }}/bext_output
|
||||
build-type: Release
|
||||
artifact-token: ${{ secrets.BEXT_ARTIFACT_TOKEN }}
|
||||
- name: Directory setup
|
||||
run: cmake -E make_directory build_distcheck-no_unity_debug
|
||||
- name: Configure
|
||||
run: cmake -S brlcad -B build_distcheck-no_unity_debug -G Ninja -DCMAKE_BUILD_TYPE=Debug -DBRLCAD_EXT_DIR=${{ runner.temp }}/bext_output -DBRLCAD_ENABLE_UNITY_BUILD=OFF
|
||||
- name: Build
|
||||
run: cmake --build build_distcheck-no_unity_debug --config Debug --target distcheck-no_unity_debug
|
||||
- name: Log
|
||||
if: always()
|
||||
run: cat build_distcheck-no_unity_debug/distcheck-no_unity_debug.log
|
||||
|
||||
distcheck-no_unity_release:
|
||||
name: distcheck-no_unity_release
|
||||
runs-on: ubuntu-24.04
|
||||
needs: [bext]
|
||||
env:
|
||||
DEBIAN_FRONTEND: noninteractive
|
||||
if: ${{ !cancelled() && github.ref == 'refs/heads/main' }}
|
||||
steps:
|
||||
- name: Setup - CMake
|
||||
uses: lukka/get-cmake@latest
|
||||
- name: Install apt dependencies
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install xserver-xorg-dev libx11-dev libxi-dev libxext-dev libglu1-mesa-dev libfontconfig-dev
|
||||
sudo apt-get install astyle re2c
|
||||
sudo apt-get install zlib1g-dev libpng-dev libjpeg-dev libtiff-dev libeigen3-dev libgdal-dev libassimp-dev libopencv-dev tcl-dev tk-dev libgl-dev libinput-dev
|
||||
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v6
|
||||
with:
|
||||
path: brlcad
|
||||
- name: Prepare bext dependencies
|
||||
uses: ./brlcad/.github/actions/prepare-bext
|
||||
with:
|
||||
platform-channel: ubuntu-24.04-${{ runner.arch }}-release
|
||||
source-dir: ${{ github.workspace }}/brlcad
|
||||
output-dir: ${{ runner.temp }}/bext_output
|
||||
build-type: Release
|
||||
artifact-token: ${{ secrets.BEXT_ARTIFACT_TOKEN }}
|
||||
- name: Directory setup
|
||||
run: cmake -E make_directory build_distcheck-no_unity_release
|
||||
- name: Configure
|
||||
run: cmake -S brlcad -B build_distcheck-no_unity_release -G Ninja -DCMAKE_BUILD_TYPE=Release -DBRLCAD_EXT_DIR=${{ runner.temp }}/bext_output -DBRLCAD_ENABLE_UNITY_BUILD=OFF
|
||||
- name: Build
|
||||
run: cmake --build build_distcheck-no_unity_release --config Release --target distcheck-no_unity_release
|
||||
- name: Log
|
||||
if: always()
|
||||
run: cat build_distcheck-no_unity_release/distcheck-no_unity_release.log
|
||||
|
||||
distcheck-enableall_debug:
|
||||
name: distcheck-enableall_debug
|
||||
runs-on: ubuntu-24.04
|
||||
needs: [distcheck-default_build_type]
|
||||
env:
|
||||
DEBIAN_FRONTEND: noninteractive
|
||||
if: ${{ !cancelled() && github.ref == 'refs/heads/main' }}
|
||||
steps:
|
||||
- name: Setup - CMake
|
||||
uses: lukka/get-cmake@latest
|
||||
- name: Install apt dependencies
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install xserver-xorg-dev libx11-dev libxi-dev libxext-dev libglu1-mesa-dev libfontconfig-dev
|
||||
sudo apt-get install astyle re2c
|
||||
sudo apt-get install zlib1g-dev libpng-dev libjpeg-dev libtiff-dev libeigen3-dev libgdal-dev libassimp-dev libopencv-dev tcl-dev tk-dev libgl-dev libinput-dev
|
||||
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v6
|
||||
with:
|
||||
path: brlcad
|
||||
- name: Prepare bext dependencies
|
||||
uses: ./brlcad/.github/actions/prepare-bext
|
||||
with:
|
||||
platform-channel: ubuntu-24.04-${{ runner.arch }}-release
|
||||
source-dir: ${{ github.workspace }}/brlcad
|
||||
output-dir: ${{ runner.temp }}/bext_output
|
||||
build-type: Release
|
||||
artifact-token: ${{ secrets.BEXT_ARTIFACT_TOKEN }}
|
||||
- name: Directory setup
|
||||
run: cmake -E make_directory build_distcheck-enableall_debug
|
||||
- name: Configure
|
||||
run: cmake -S brlcad -B build_distcheck-enableall_debug -G Ninja -DCMAKE_BUILD_TYPE=Debug -DENABLE_ALL=ON -DBRLCAD_EXT_DIR=${{ runner.temp }}/bext_output
|
||||
- name: Build
|
||||
run: cmake --build build_distcheck-enableall_debug --config Debug --target distcheck-enableall_debug
|
||||
- name: Log
|
||||
if: always()
|
||||
run: cat build_distcheck-enableall_debug/distcheck-enableall_debug.log
|
||||
|
||||
distcheck-enableall_release:
|
||||
name: distcheck-enableall_release
|
||||
runs-on: ubuntu-24.04
|
||||
needs: [distcheck-debug]
|
||||
env:
|
||||
DEBIAN_FRONTEND: noninteractive
|
||||
if: ${{ !cancelled() && github.ref == 'refs/heads/main' }}
|
||||
steps:
|
||||
- name: Setup - CMake
|
||||
uses: lukka/get-cmake@latest
|
||||
- name: Install apt dependencies
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install xserver-xorg-dev libx11-dev libxi-dev libxext-dev libglu1-mesa-dev libfontconfig-dev
|
||||
sudo apt-get install astyle re2c
|
||||
sudo apt-get install zlib1g-dev libpng-dev libjpeg-dev libtiff-dev libeigen3-dev libgdal-dev libassimp-dev libopencv-dev tcl-dev tk-dev libgl-dev libinput-dev
|
||||
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v6
|
||||
with:
|
||||
path: brlcad
|
||||
- name: Prepare bext dependencies
|
||||
uses: ./brlcad/.github/actions/prepare-bext
|
||||
with:
|
||||
platform-channel: ubuntu-24.04-${{ runner.arch }}-release
|
||||
source-dir: ${{ github.workspace }}/brlcad
|
||||
output-dir: ${{ runner.temp }}/bext_output
|
||||
build-type: Release
|
||||
artifact-token: ${{ secrets.BEXT_ARTIFACT_TOKEN }}
|
||||
- name: Directory setup
|
||||
run: cmake -E make_directory build_distcheck-enableall_release
|
||||
- name: Configure
|
||||
run: cmake -S brlcad -B build_distcheck-enableall_release -G Ninja -DCMAKE_BUILD_TYPE=Release -DENABLE_ALL=ON -DBRLCAD_EXT_DIR=${{ runner.temp }}/bext_output
|
||||
- name: Build
|
||||
run: cmake --build build_distcheck-enableall_release --config Release --target distcheck-enableall_release
|
||||
- name: Log
|
||||
if: always()
|
||||
run: cat build_distcheck-enableall_release/distcheck-enableall_release.log
|
||||
|
||||
distcheck-prepared_debug:
|
||||
name: distcheck-prepared_debug
|
||||
runs-on: ubuntu-24.04
|
||||
needs: [distcheck-release]
|
||||
env:
|
||||
DEBIAN_FRONTEND: noninteractive
|
||||
if: ${{ !cancelled() && github.ref == 'refs/heads/main' }}
|
||||
steps:
|
||||
- name: Setup - CMake
|
||||
uses: lukka/get-cmake@latest
|
||||
- name: Install apt dependencies
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install xserver-xorg-dev libx11-dev libxi-dev libxext-dev libglu1-mesa-dev libfontconfig-dev
|
||||
sudo apt-get install astyle re2c
|
||||
sudo apt-get install zlib1g-dev libpng-dev libjpeg-dev libtiff-dev libeigen3-dev libgdal-dev libassimp-dev libopencv-dev tcl-dev tk-dev libgl-dev libinput-dev
|
||||
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v6
|
||||
with:
|
||||
path: brlcad
|
||||
- name: Prepare bext dependencies
|
||||
uses: ./brlcad/.github/actions/prepare-bext
|
||||
with:
|
||||
platform-channel: ubuntu-24.04-${{ runner.arch }}-release
|
||||
source-dir: ${{ github.workspace }}/brlcad
|
||||
output-dir: ${{ runner.temp }}/bext_output
|
||||
build-type: Release
|
||||
artifact-token: ${{ secrets.BEXT_ARTIFACT_TOKEN }}
|
||||
- name: Directory setup
|
||||
run: cmake -E make_directory build_distcheck-prepared_debug
|
||||
- name: Configure
|
||||
run: cmake -S brlcad -B build_distcheck-prepared_debug -G Ninja -DCMAKE_BUILD_TYPE=Debug -DBRLCAD_EXT_DIR=${{ runner.temp }}/bext_output
|
||||
- name: Build
|
||||
run: cmake --build build_distcheck-prepared_debug --config Debug --target distcheck-prepared_debug
|
||||
- name: Log
|
||||
if: always()
|
||||
run: cat build_distcheck-prepared_debug/distcheck-prepared_debug.log
|
||||
|
||||
distcheck-prepared_release:
|
||||
name: distcheck-prepared_release
|
||||
runs-on: ubuntu-24.04
|
||||
needs: [distcheck-no_unity_debug]
|
||||
env:
|
||||
DEBIAN_FRONTEND: noninteractive
|
||||
if: ${{ !cancelled() && github.ref == 'refs/heads/main' }}
|
||||
steps:
|
||||
- name: Setup - CMake
|
||||
uses: lukka/get-cmake@latest
|
||||
- name: Install apt dependencies
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install xserver-xorg-dev libx11-dev libxi-dev libxext-dev libglu1-mesa-dev libfontconfig-dev
|
||||
sudo apt-get install astyle re2c
|
||||
sudo apt-get install zlib1g-dev libpng-dev libjpeg-dev libtiff-dev libeigen3-dev libgdal-dev libassimp-dev libopencv-dev tcl-dev tk-dev libgl-dev libinput-dev
|
||||
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v6
|
||||
with:
|
||||
path: brlcad
|
||||
- name: Prepare bext dependencies
|
||||
uses: ./brlcad/.github/actions/prepare-bext
|
||||
with:
|
||||
platform-channel: ubuntu-24.04-${{ runner.arch }}-release
|
||||
source-dir: ${{ github.workspace }}/brlcad
|
||||
output-dir: ${{ runner.temp }}/bext_output
|
||||
build-type: Release
|
||||
artifact-token: ${{ secrets.BEXT_ARTIFACT_TOKEN }}
|
||||
- name: Directory setup
|
||||
run: cmake -E make_directory build_distcheck-prepared_release
|
||||
- name: Configure
|
||||
run: cmake -S brlcad -B build_distcheck-prepared_release -G Ninja -DCMAKE_BUILD_TYPE=Release -DBRLCAD_EXT_DIR=${{ runner.temp }}/bext_output
|
||||
- name: Build
|
||||
run: cmake --build build_distcheck-prepared_release --config Release --target distcheck-prepared_release
|
||||
- name: Log
|
||||
if: always()
|
||||
run: cat build_distcheck-prepared_release/distcheck-prepared_release.log
|
||||
|
||||
distcheck-no_tcl:
|
||||
name: distcheck-no_tcl
|
||||
runs-on: ubuntu-24.04
|
||||
needs: [distcheck-no_unity_release]
|
||||
env:
|
||||
DEBIAN_FRONTEND: noninteractive
|
||||
if: ${{ !cancelled() && github.ref == 'refs/heads/main' }}
|
||||
steps:
|
||||
- name: Setup - CMake
|
||||
uses: lukka/get-cmake@latest
|
||||
- name: Install apt dependencies
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install xserver-xorg-dev libx11-dev libxi-dev libxext-dev libglu1-mesa-dev libfontconfig-dev
|
||||
sudo apt-get install astyle re2c
|
||||
sudo apt-get install zlib1g-dev libpng-dev libjpeg-dev libtiff-dev libeigen3-dev libgdal-dev libassimp-dev libopencv-dev tcl-dev tk-dev libgl-dev libinput-dev
|
||||
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v6
|
||||
with:
|
||||
path: brlcad
|
||||
- name: Prepare bext dependencies
|
||||
uses: ./brlcad/.github/actions/prepare-bext
|
||||
with:
|
||||
platform-channel: ubuntu-24.04-${{ runner.arch }}-release
|
||||
source-dir: ${{ github.workspace }}/brlcad
|
||||
output-dir: ${{ runner.temp }}/bext_output
|
||||
build-type: Release
|
||||
artifact-token: ${{ secrets.BEXT_ARTIFACT_TOKEN }}
|
||||
- name: Directory setup
|
||||
run: cmake -E make_directory build_distcheck-no_tcl
|
||||
- name: Configure
|
||||
run: cmake -S brlcad -B build_distcheck-no_tcl -G Ninja -DCMAKE_BUILD_TYPE=Debug -DBRLCAD_EXT_DIR=${{ runner.temp }}/bext_output -DBRLCAD_ENABLE_TCL=OFF
|
||||
- name: Build
|
||||
run: cmake --build build_distcheck-no_tcl --config Debug --target distcheck-no_tcl
|
||||
- name: Log
|
||||
if: always()
|
||||
run: cat build_distcheck-no_tcl/distcheck-no_tcl.log
|
||||
|
||||
distcheck-no_tk:
|
||||
name: distcheck-no_tk
|
||||
runs-on: ubuntu-24.04
|
||||
needs: [distcheck-enableall_debug]
|
||||
env:
|
||||
DEBIAN_FRONTEND: noninteractive
|
||||
if: ${{ !cancelled() && github.ref == 'refs/heads/main' }}
|
||||
steps:
|
||||
- name: Setup - CMake
|
||||
uses: lukka/get-cmake@latest
|
||||
- name: Install apt dependencies
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install xserver-xorg-dev libx11-dev libxi-dev libxext-dev libglu1-mesa-dev libfontconfig-dev
|
||||
sudo apt-get install astyle re2c
|
||||
sudo apt-get install zlib1g-dev libpng-dev libjpeg-dev libtiff-dev libeigen3-dev libgdal-dev libassimp-dev libopencv-dev libgl-dev libinput-dev
|
||||
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v6
|
||||
with:
|
||||
path: brlcad
|
||||
- name: Prepare bext dependencies
|
||||
uses: ./brlcad/.github/actions/prepare-bext
|
||||
with:
|
||||
platform-channel: ubuntu-24.04-${{ runner.arch }}-release
|
||||
source-dir: ${{ github.workspace }}/brlcad
|
||||
output-dir: ${{ runner.temp }}/bext_output
|
||||
build-type: Release
|
||||
artifact-token: ${{ secrets.BEXT_ARTIFACT_TOKEN }}
|
||||
- name: Directory setup
|
||||
run: cmake -E make_directory build_distcheck-no_tk
|
||||
- name: Configure
|
||||
run: cmake -S brlcad -B build_distcheck-no_tk -G Ninja -DCMAKE_BUILD_TYPE=Debug -DBRLCAD_EXT_DIR=${{ runner.temp }}/bext_output -DBRLCAD_ENABLE_TK=OFF
|
||||
- name: Build
|
||||
run: cmake --build build_distcheck-no_tk --config Debug --target distcheck-no_tk
|
||||
- name: Log
|
||||
if: always()
|
||||
run: cat build_distcheck-no_tk/distcheck-no_tk.log
|
||||
|
||||
distcheck-no_strict:
|
||||
name: distcheck-no_strict
|
||||
runs-on: ubuntu-24.04
|
||||
needs: [distcheck-enableall_release]
|
||||
env:
|
||||
DEBIAN_FRONTEND: noninteractive
|
||||
if: ${{ !cancelled() && github.ref == 'refs/heads/main' }}
|
||||
steps:
|
||||
- name: Setup - CMake
|
||||
uses: lukka/get-cmake@latest
|
||||
- name: Install apt dependencies
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install xserver-xorg-dev libx11-dev libxi-dev libxext-dev libglu1-mesa-dev libfontconfig-dev
|
||||
sudo apt-get install astyle re2c
|
||||
sudo apt-get install zlib1g-dev libpng-dev libjpeg-dev libtiff-dev libeigen3-dev libgdal-dev libassimp-dev libopencv-dev tcl-dev tk-dev libgl-dev libinput-dev
|
||||
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v6
|
||||
with:
|
||||
path: brlcad
|
||||
- name: Prepare bext dependencies
|
||||
uses: ./brlcad/.github/actions/prepare-bext
|
||||
with:
|
||||
platform-channel: ubuntu-24.04-${{ runner.arch }}-release
|
||||
source-dir: ${{ github.workspace }}/brlcad
|
||||
output-dir: ${{ runner.temp }}/bext_output
|
||||
build-type: Release
|
||||
artifact-token: ${{ secrets.BEXT_ARTIFACT_TOKEN }}
|
||||
- name: Directory setup
|
||||
run: cmake -E make_directory build_distcheck-no_strict
|
||||
- name: Configure
|
||||
run: cmake -S brlcad -B build_distcheck-no_strict -G Ninja -DCMAKE_BUILD_TYPE=Debug -DBRLCAD_EXT_DIR=${{ runner.temp }}/bext_output -DBRLCAD_ENABLE_STRICT=OFF
|
||||
- name: Build
|
||||
run: cmake --build build_distcheck-no_strict --config Debug --target distcheck-no_strict
|
||||
- name: Log
|
||||
if: always()
|
||||
run: cat build_distcheck-no_strict/distcheck-no_strict.log
|
||||
|
||||
distcheck-no_object:
|
||||
name: distcheck-no_object
|
||||
runs-on: ubuntu-24.04
|
||||
needs: [distcheck-prepared_debug]
|
||||
env:
|
||||
DEBIAN_FRONTEND: noninteractive
|
||||
if: ${{ !cancelled() && github.ref == 'refs/heads/main' }}
|
||||
steps:
|
||||
- name: Setup - CMake
|
||||
uses: lukka/get-cmake@latest
|
||||
- name: Install apt dependencies
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install xserver-xorg-dev libx11-dev libxi-dev libxext-dev libglu1-mesa-dev libfontconfig-dev
|
||||
sudo apt-get install astyle re2c
|
||||
sudo apt-get install zlib1g-dev libpng-dev libjpeg-dev libtiff-dev libeigen3-dev libgdal-dev libassimp-dev libopencv-dev tcl-dev tk-dev libgl-dev libinput-dev
|
||||
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v6
|
||||
with:
|
||||
path: brlcad
|
||||
- name: Prepare bext dependencies
|
||||
uses: ./brlcad/.github/actions/prepare-bext
|
||||
with:
|
||||
platform-channel: ubuntu-24.04-${{ runner.arch }}-release
|
||||
source-dir: ${{ github.workspace }}/brlcad
|
||||
output-dir: ${{ runner.temp }}/bext_output
|
||||
build-type: Release
|
||||
artifact-token: ${{ secrets.BEXT_ARTIFACT_TOKEN }}
|
||||
- name: Directory setup
|
||||
run: cmake -E make_directory build_distcheck-no_object
|
||||
- name: Configure
|
||||
run: cmake -S brlcad -B build_distcheck-no_object -G Ninja -DCMAKE_BUILD_TYPE=Debug -DBRLCAD_EXT_DIR=${{ runner.temp }}/bext_output -DUSE_OBJECT_LIBS=OFF
|
||||
- name: Build
|
||||
run: cmake --build build_distcheck-no_object --config Debug --target distcheck-no_object
|
||||
- name: Log
|
||||
if: always()
|
||||
run: cat build_distcheck-no_object/distcheck-no_object.log
|
||||
|
||||
distcheck-odd_pathnames:
|
||||
name: distcheck-odd_pathnames
|
||||
runs-on: ubuntu-24.04
|
||||
needs: [distcheck-prepared_release]
|
||||
env:
|
||||
DEBIAN_FRONTEND: noninteractive
|
||||
if: ${{ !cancelled() && github.ref == 'refs/heads/main' }}
|
||||
steps:
|
||||
- name: Setup - CMake
|
||||
uses: lukka/get-cmake@latest
|
||||
- name: Install apt dependencies
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install xserver-xorg-dev libx11-dev libxi-dev libxext-dev libglu1-mesa-dev libfontconfig-dev
|
||||
sudo apt-get install astyle re2c
|
||||
sudo apt-get install zlib1g-dev libpng-dev libjpeg-dev libtiff-dev libeigen3-dev libgdal-dev libassimp-dev libopencv-dev tcl-dev tk-dev libgl-dev libinput-dev
|
||||
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v6
|
||||
with:
|
||||
path: brlcad
|
||||
- name: Prepare bext dependencies
|
||||
uses: ./brlcad/.github/actions/prepare-bext
|
||||
with:
|
||||
platform-channel: ubuntu-24.04-${{ runner.arch }}-release
|
||||
source-dir: ${{ github.workspace }}/brlcad
|
||||
output-dir: ${{ runner.temp }}/bext_output
|
||||
build-type: Release
|
||||
artifact-token: ${{ secrets.BEXT_ARTIFACT_TOKEN }}
|
||||
- name: Directory setup
|
||||
run: cmake -E make_directory build_distcheck-odd_pathnames
|
||||
- name: Configure
|
||||
run: cmake -S brlcad -B build_distcheck-odd_pathnames -G Ninja -DCMAKE_BUILD_TYPE=Debug -DBRLCAD_EXT_DIR=${{ runner.temp }}/bext_output
|
||||
- name: Build
|
||||
run: cmake --build build_distcheck-odd_pathnames --config Debug --target distcheck-odd_pathnames
|
||||
- name: Log
|
||||
if: always()
|
||||
run: cat build_distcheck-odd_pathnames/distcheck-odd_pathnames.log
|
||||
|
||||
distcheck-in_src_dir:
|
||||
name: distcheck-in_src_dir
|
||||
runs-on: ubuntu-24.04
|
||||
needs: [distcheck-no_tcl]
|
||||
env:
|
||||
DEBIAN_FRONTEND: noninteractive
|
||||
if: ${{ !cancelled() && github.ref == 'refs/heads/main' }}
|
||||
steps:
|
||||
- name: Setup - CMake
|
||||
uses: lukka/get-cmake@latest
|
||||
- name: Install apt dependencies
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install xserver-xorg-dev libx11-dev libxi-dev libxext-dev libglu1-mesa-dev libfontconfig-dev
|
||||
sudo apt-get install astyle re2c
|
||||
sudo apt-get install zlib1g-dev libpng-dev libjpeg-dev libtiff-dev libeigen3-dev libgdal-dev libassimp-dev libopencv-dev tcl-dev tk-dev libgl-dev libinput-dev
|
||||
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v6
|
||||
with:
|
||||
path: brlcad
|
||||
- name: Prepare bext dependencies
|
||||
uses: ./brlcad/.github/actions/prepare-bext
|
||||
with:
|
||||
platform-channel: ubuntu-24.04-${{ runner.arch }}-release
|
||||
source-dir: ${{ github.workspace }}/brlcad
|
||||
output-dir: ${{ runner.temp }}/bext_output
|
||||
build-type: Release
|
||||
artifact-token: ${{ secrets.BEXT_ARTIFACT_TOKEN }}
|
||||
- name: Directory setup
|
||||
run: cmake -E make_directory build_distcheck-in_src_dir
|
||||
- name: Configure
|
||||
run: cmake -S brlcad -B build_distcheck-in_src_dir -G Ninja -DCMAKE_BUILD_TYPE=Debug -DBRLCAD_EXT_DIR=${{ runner.temp }}/bext_output
|
||||
- name: Build
|
||||
run: cmake --build build_distcheck-in_src_dir --config Debug --target distcheck-in_src_dir
|
||||
- name: Log
|
||||
if: always()
|
||||
run: cat build_distcheck-in_src_dir/distcheck-in_src_dir.log
|
||||
@@ -1,85 +0,0 @@
|
||||
# The purpose of this particular test definition is to support on-demand
|
||||
# interactive command shells. We sometimes see problems that occur only in the
|
||||
# Github Runner environments, and in order to explore what is happening we need
|
||||
# an interactive prompt (the alternative is hours-per-cycle submit and test
|
||||
# loops, which doesn't scale at all.)
|
||||
#
|
||||
# Unlike the other BRL-CAD tests, this one is started manually from the Github
|
||||
# website. For more information see https://mxschmitt.github.io/action-tmate/
|
||||
#
|
||||
# The "recommended" way to use this action is for the dev to make a fork of
|
||||
# the repository, alter the configure and/or build logic below for their
|
||||
# particular use case (the example below is a libged-only build used to zero
|
||||
# in on a specific libged behavior) before running.
|
||||
|
||||
name: BRL-CAD Linux Interactive Debugging
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
debug_enabled:
|
||||
type: boolean
|
||||
description: 'Run the build with tmate debugging enabled (https://github.com/marketplace/actions/debugging-with-tmate)'
|
||||
required: false
|
||||
default: false
|
||||
|
||||
jobs:
|
||||
|
||||
linux:
|
||||
name: Ubuntu Latest GCC
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
|
||||
- name: Setup - CMake
|
||||
uses: lukka/get-cmake@latest
|
||||
|
||||
- name: Setup - System
|
||||
env:
|
||||
DEBIAN_FRONTEND: noninteractive
|
||||
run: |
|
||||
sudo apt-get update
|
||||
# Install X/OpenGL dev pkgs
|
||||
sudo apt-get install xserver-xorg-dev libx11-dev libxi-dev libxext-dev libglu1-mesa-dev libfontconfig-dev
|
||||
# Install tools
|
||||
sudo apt-get install astyle re2c xsltproc libxml2-utils liblief-dev
|
||||
# Install dependency dev pkgs
|
||||
sudo apt-get install zlib1g-dev libpng-dev libjpeg-dev libtiff-dev libeigen3-dev libgdal-dev libassimp-dev libopencv-dev tcl-dev tk-dev
|
||||
# Cleanup (we want to avoid wasting disk space)
|
||||
sudo apt-get clean
|
||||
|
||||
- name: Setup - System Qt Build Requirements
|
||||
env:
|
||||
DEBIAN_FRONTEND: noninteractive
|
||||
run: |
|
||||
sudo apt-get update
|
||||
# Install XCB/OpenGL dev pkgs for Qt - see:
|
||||
# https://wiki.qt.io/Building_Qt_6_from_Git
|
||||
# https://doc.qt.io/qt-6/linux-requirements.html
|
||||
sudo apt-get install libfontconfig1-dev libfreetype6-dev libx11-dev libx11-xcb-dev libxext-dev libxfixes-dev libxi-dev libxrender-dev libxcb1-dev libxcb-cursor-dev libxcb-glx0-dev libxcb-keysyms1-dev libxcb-image0-dev libxcb-shm0-dev libxcb-icccm4-dev libxcb-sync-dev libxcb-xfixes0-dev libxcb-shape0-dev libxcb-randr0-dev libxcb-render-util0-dev libxcb-util-dev libxcb-xinerama0-dev libxcb-xkb-dev libxkbcommon-dev libxkbcommon-x11-dev
|
||||
sudo apt-get install libgl-dev
|
||||
sudo apt-get install libinput-dev
|
||||
sudo apt-get clean
|
||||
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v6
|
||||
|
||||
- name: Build Directory setup
|
||||
run: |
|
||||
cmake -E make_directory ./build_linux
|
||||
|
||||
- name: Configure
|
||||
run: |
|
||||
export PATH=$GITHUB_WORKSPACE:$PATH
|
||||
cmake -S . -G Ninja -B build_linux -DBRLCAD_EXT_PARALLEL=1 -DBRLCAD_COMPONENTS=libged -DBRLCAD_EXTRADOCS=OFF
|
||||
|
||||
- name: Build
|
||||
run: |
|
||||
export PATH=$GITHUB_WORKSPACE:$PATH
|
||||
cmake --build build_linux --config Release --target check
|
||||
|
||||
- name: Debugging - tmate session
|
||||
if: ${{ github.event_name == 'workflow_dispatch' && inputs.debug_enabled }}
|
||||
uses: mxschmitt/action-tmate@v3
|
||||
with:
|
||||
limit-access-to-actor: true
|
||||
|
||||
@@ -1,449 +0,0 @@
|
||||
# This file defines Continuous Integration (CI) tests for BRL-CAD using the
|
||||
# Github Actions framework that are executed each time a commit is pushed.
|
||||
# Currently it defines configurations for Windows, Linux and OSX.
|
||||
#
|
||||
# For more information about available platforms for testing, see:
|
||||
#
|
||||
# https://docs.github.com/en/free-pro-team@latest/actions/reference/specifications-for-github-hosted-runners
|
||||
#
|
||||
# The general rule when building in CI is to go more verbose in output settings
|
||||
# rather than less, since iterative debugging isn't practical. We also want to
|
||||
# avoid parallel building - while that will sometimes catch dependency issues,
|
||||
# it also makes the outputs far harder to interpret when there is a problem.
|
||||
# Better to do parallel build debugging in an environment were more interactive
|
||||
# and iterative debugging is available while preserving the readability of the
|
||||
# CI outputs for other issues.
|
||||
|
||||
name: Per-push
|
||||
|
||||
on:
|
||||
push:
|
||||
|
||||
jobs:
|
||||
|
||||
linux:
|
||||
name: Ubuntu GCC
|
||||
runs-on: ubuntu-24.04
|
||||
strategy:
|
||||
fail-fast: true
|
||||
env:
|
||||
DEBIAN_FRONTEND: noninteractive
|
||||
if: github.event_name == 'push'
|
||||
steps:
|
||||
- name: Setup - CMake
|
||||
uses: lukka/get-cmake@latest
|
||||
|
||||
# Install system dependencies
|
||||
- name: Install apt dependencies
|
||||
run: |
|
||||
sudo apt-get update
|
||||
# Install X/OpenGL dev pkgs
|
||||
sudo apt-get install xserver-xorg-dev libx11-dev libxi-dev libxext-dev libglu1-mesa-dev libfontconfig-dev
|
||||
# Install tools
|
||||
sudo apt-get install astyle re2c xsltproc libxml2-utils
|
||||
# Install dependency dev pkgs
|
||||
sudo apt-get install zlib1g-dev libpng-dev libjpeg-dev libtiff-dev libeigen3-dev libgdal-dev libassimp-dev libopencv-dev tcl-dev tk-dev
|
||||
# Install XCB/OpenGL dev pkgs for Qt - see:
|
||||
# https://wiki.qt.io/Building_Qt_6_from_Git
|
||||
# https://doc.qt.io/qt-6/linux-requirements.html
|
||||
sudo apt-get install libfontconfig1-dev libfreetype6-dev libx11-dev libx11-xcb-dev libxext-dev libxfixes-dev libxi-dev libxrender-dev libxcb1-dev libxcb-cursor-dev libxcb-glx0-dev libxcb-keysyms1-dev libxcb-image0-dev libxcb-shm0-dev libxcb-icccm4-dev libxcb-sync-dev libxcb-xfixes0-dev libxcb-shape0-dev libxcb-randr0-dev libxcb-render-util0-dev libxcb-util-dev libxcb-xinerama0-dev libxcb-xkb-dev libxcb-xinput-dev libxcb-xrm-dev libxkbcommon-dev libxkbcommon-x11-dev
|
||||
sudo apt-get install libgl-dev
|
||||
sudo apt-get install libinput-dev
|
||||
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v6
|
||||
with:
|
||||
path: brlcad
|
||||
|
||||
- name: Prepare bext dependencies
|
||||
uses: ./brlcad/.github/actions/prepare-bext
|
||||
with:
|
||||
platform-channel: ubuntu-24.04-${{ runner.arch }}-release
|
||||
source-dir: ${{ github.workspace }}/brlcad
|
||||
output-dir: ${{ runner.temp }}/bext_output
|
||||
build-type: Release
|
||||
artifact-token: ${{ secrets.BEXT_ARTIFACT_TOKEN }}
|
||||
|
||||
- name: Directory setup
|
||||
run: |
|
||||
cmake -E make_directory ./build_linux
|
||||
cmake -E make_directory $HOME/.cache
|
||||
cmake -E make_directory $HOME/.cache/BRL-CAD
|
||||
|
||||
- name: Configure
|
||||
run: |
|
||||
export PATH=$GITHUB_WORKSPACE:$PATH
|
||||
cmake -S brlcad -B build_linux -G Ninja -DCMAKE_BUILD_TYPE=Release -DBRLCAD_EXT_DIR=${{ runner.temp }}/bext_output -DBRLCAD_ENABLE_QT=ON
|
||||
|
||||
- name: Build
|
||||
id: build_parallel
|
||||
run: |
|
||||
export PATH=$GITHUB_WORKSPACE:$PATH
|
||||
cmake --build build_linux --config Release --target check -j2
|
||||
cmake --build build_linux --config Release --target package -j2
|
||||
continue-on-error: true
|
||||
|
||||
- name: Build (serial for diagnostics)
|
||||
if: steps.build_parallel.outcome == 'failure'
|
||||
run: |
|
||||
export PATH=$GITHUB_WORKSPACE:$PATH
|
||||
cmake --build build_linux --config Release --target check
|
||||
cmake --build build_linux --config Release --target package
|
||||
|
||||
# A full distcheck is too expensive for the runners, but we can run the
|
||||
# repository integrity check and make sure we can build source archives.
|
||||
archives:
|
||||
name: Source Archives
|
||||
runs-on: ubuntu-24.04
|
||||
needs: [linux]
|
||||
strategy:
|
||||
fail-fast: true
|
||||
env:
|
||||
DEBIAN_FRONTEND: noninteractive
|
||||
if: github.event_name == 'push'
|
||||
steps:
|
||||
- name: Setup - CMake
|
||||
uses: lukka/get-cmake@latest
|
||||
|
||||
# Install system dependencies - we do the full setup here, even though
|
||||
# source archives isn't intended to build the main BRL-CAD, in case
|
||||
# this check is the one where the bext dependency cache check gets a miss.
|
||||
# In that case, this check will have to build bext to proceed - and it will
|
||||
# need the bext environment set up to do so.
|
||||
- name: Install apt dependencies
|
||||
run: |
|
||||
sudo apt-get update
|
||||
# Install X/OpenGL dev pkgs
|
||||
sudo apt-get install xserver-xorg-dev libx11-dev libxi-dev libxext-dev libglu1-mesa-dev libfontconfig-dev
|
||||
# Install tools
|
||||
sudo apt-get install astyle re2c xsltproc libxml2-utils
|
||||
# Install dependency dev pkgs
|
||||
sudo apt-get install zlib1g-dev libpng-dev libjpeg-dev libtiff-dev libeigen3-dev libgdal-dev libassimp-dev libopencv-dev tcl-dev tk-dev
|
||||
# Install XCB/OpenGL dev pkgs for Qt - see:
|
||||
# https://wiki.qt.io/Building_Qt_6_from_Git
|
||||
# https://doc.qt.io/qt-6/linux-requirements.html
|
||||
sudo apt-get install libfontconfig1-dev libfreetype6-dev libx11-dev libx11-xcb-dev libxext-dev libxfixes-dev libxi-dev libxrender-dev libxcb1-dev libxcb-cursor-dev libxcb-glx0-dev libxcb-keysyms1-dev libxcb-image0-dev libxcb-shm0-dev libxcb-icccm4-dev libxcb-sync-dev libxcb-xfixes0-dev libxcb-shape0-dev libxcb-randr0-dev libxcb-render-util0-dev libxcb-util-dev libxcb-xinerama0-dev libxcb-xkb-dev libxcb-xinput-dev libxcb-xrm-dev libxkbcommon-dev libxkbcommon-x11-dev
|
||||
sudo apt-get install libgl-dev
|
||||
sudo apt-get install libinput-dev
|
||||
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v6
|
||||
with:
|
||||
path: brlcad
|
||||
|
||||
- name: Prepare bext dependencies
|
||||
uses: ./brlcad/.github/actions/prepare-bext
|
||||
with:
|
||||
platform-channel: ubuntu-24.04-${{ runner.arch }}-release
|
||||
source-dir: ${{ github.workspace }}/brlcad
|
||||
output-dir: ${{ runner.temp }}/bext_output
|
||||
build-type: Release
|
||||
artifact-token: ${{ secrets.BEXT_ARTIFACT_TOKEN }}
|
||||
|
||||
- name: Build
|
||||
run: |
|
||||
cmake -E make_directory build_archives
|
||||
cmake -S brlcad -B build_archives -DCMAKE_BUILD_TYPE=Release -DBRLCAD_EXT_PARALLEL=1 -DBRLCAD_EXT_DIR=${{ runner.temp }}/bext_output
|
||||
cmake --build build_archives --config Release --target distcheck-source_archives
|
||||
|
||||
# A full bext build every time we push is too much, but we can exercise the
|
||||
# basic bext mechanisms and also the BRLCAD_COMPONENTS subbuild at the same
|
||||
# time if we do a local bext build of *just* the libbg subset of BRL-CAD. If
|
||||
# the COMPONENTS mechanism works as it should it won't trigger a full bext
|
||||
# build, and we'll only be compiling what libbg needs.
|
||||
componentbext:
|
||||
name: BRLCAD_COMPONENTS
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
fail-fast: true
|
||||
env:
|
||||
DEBIAN_FRONTEND: noninteractive
|
||||
if: github.event_name == 'push'
|
||||
steps:
|
||||
- name: Setup - CMake
|
||||
uses: lukka/get-cmake@latest
|
||||
|
||||
# Install system dependencies - we do the full setup here, even though
|
||||
# source archives isn't intended to build the main BRL-CAD, in case
|
||||
# this check is the one where the bext dependency cache check gets a miss.
|
||||
# In that case, this check will have to build bext to proceed - and it will
|
||||
# need the bext environment set up to do so.
|
||||
- name: Install apt dependencies
|
||||
run: |
|
||||
sudo apt-get update
|
||||
# Install X/OpenGL dev pkgs
|
||||
sudo apt-get install xserver-xorg-dev libx11-dev libxi-dev libxext-dev libglu1-mesa-dev libfontconfig-dev
|
||||
# Install tools
|
||||
sudo apt-get install astyle re2c xsltproc libxml2-utils
|
||||
# Install dependency dev pkgs
|
||||
sudo apt-get install zlib1g-dev libpng-dev libjpeg-dev libtiff-dev libeigen3-dev libgdal-dev libassimp-dev libopencv-dev tcl-dev tk-dev
|
||||
# Install XCB/OpenGL dev pkgs for Qt - see:
|
||||
# https://wiki.qt.io/Building_Qt_6_from_Git
|
||||
# https://doc.qt.io/qt-6/linux-requirements.html
|
||||
sudo apt-get install libfontconfig1-dev libfreetype6-dev libx11-dev libx11-xcb-dev libxext-dev libxfixes-dev libxi-dev libxrender-dev libxcb1-dev libxcb-cursor-dev libxcb-glx0-dev libxcb-keysyms1-dev libxcb-image0-dev libxcb-shm0-dev libxcb-icccm4-dev libxcb-sync-dev libxcb-xfixes0-dev libxcb-shape0-dev libxcb-randr0-dev libxcb-render-util0-dev libxcb-util-dev libxcb-xinerama0-dev libxcb-xkb-dev libxcb-xinput-dev libxcb-xrm-dev libxkbcommon-dev libxkbcommon-x11-dev
|
||||
sudo apt-get install libgl-dev
|
||||
sudo apt-get install libinput-dev
|
||||
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v6
|
||||
with:
|
||||
path: brlcad
|
||||
|
||||
- name: Directory setup
|
||||
run: |
|
||||
cmake -E make_directory build_components
|
||||
cmake -E make_directory $HOME/.cache
|
||||
cmake -E make_directory $HOME/.cache/BRL-CAD
|
||||
|
||||
- name: Build
|
||||
run: |
|
||||
cmake -S brlcad -B build_components -DCMAKE_BUILD_TYPE=Release -DBRLCAD_COMPONENTS=libbg
|
||||
cmake --build build_components --config Release
|
||||
|
||||
windows:
|
||||
name: MSVC - Ninja
|
||||
runs-on: windows-2025
|
||||
strategy:
|
||||
fail-fast: true
|
||||
if: github.event_name == 'push'
|
||||
steps:
|
||||
- name: Setup - CMake
|
||||
uses: lukka/get-cmake@latest
|
||||
|
||||
- name: Add msbuild to PATH
|
||||
uses: microsoft/setup-msbuild@v3
|
||||
|
||||
- name: Add cl.exe to PATH
|
||||
uses: ilammy/msvc-dev-cmd@v1
|
||||
|
||||
- name: Add github workspace to path
|
||||
shell: pwsh
|
||||
run: Add-Content -Path $env:GITHUB_PATH -Value $env:GITHUB_WORKSPACE
|
||||
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v6
|
||||
with:
|
||||
path: brlcad
|
||||
|
||||
- name: Prepare bext dependencies
|
||||
uses: ./brlcad/.github/actions/prepare-bext
|
||||
with:
|
||||
platform-channel: windows-2025-${{ runner.arch }}-release
|
||||
source-dir: ${{ github.workspace }}/brlcad
|
||||
output-dir: ${{ runner.temp }}/bext_output
|
||||
build-type: Release
|
||||
artifact-token: ${{ secrets.BEXT_ARTIFACT_TOKEN }}
|
||||
|
||||
- name: Build Directory setup
|
||||
run: cmake -E make_directory ./build_winninja
|
||||
|
||||
- name: Configure
|
||||
shell: powershell
|
||||
run: |
|
||||
cmake -S brlcad -B build_winninja -G Ninja -DCMAKE_C_COMPILER="cl.exe" -DCMAKE_CXX_COMPILER="cl.exe" -DBRLCAD_EXT_DIR=${{ runner.temp }}\bext_output -DCMAKE_BUILD_TYPE=Release -DBRLCAD_ENABLE_QT=ON
|
||||
|
||||
- name: Build
|
||||
id: build_parallel
|
||||
shell: powershell
|
||||
run: |
|
||||
ninja
|
||||
working-directory: ${{ github.workspace }}/build_winninja
|
||||
continue-on-error: true
|
||||
|
||||
- name: Build (serial for diagnostics)
|
||||
if: steps.build_parallel.outcome == 'failure'
|
||||
shell: powershell
|
||||
run: |
|
||||
ninja -j1 -v
|
||||
working-directory: ${{ github.workspace }}/build_winninja
|
||||
|
||||
- name: Check
|
||||
shell: powershell
|
||||
run: |
|
||||
ninja check -v
|
||||
working-directory: ${{ github.workspace }}/build_winninja
|
||||
|
||||
- name: Package
|
||||
shell: powershell
|
||||
run: |
|
||||
ninja package
|
||||
working-directory: ${{ github.workspace }}/build_winninja
|
||||
|
||||
windows_std_tools:
|
||||
name: MSVC - Standard Tools
|
||||
needs: [windows]
|
||||
runs-on: windows-2025
|
||||
strategy:
|
||||
fail-fast: true
|
||||
if: github.event_name == 'push'
|
||||
steps:
|
||||
- name: Setup - CMake
|
||||
uses: lukka/get-cmake@latest
|
||||
|
||||
- name: Add msbuild to PATH
|
||||
uses: microsoft/setup-msbuild@v3
|
||||
|
||||
- name: Add cl.exe to PATH
|
||||
uses: ilammy/msvc-dev-cmd@v1
|
||||
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v6
|
||||
with:
|
||||
path: brlcad
|
||||
|
||||
- name: Prepare bext dependencies
|
||||
uses: ./brlcad/.github/actions/prepare-bext
|
||||
with:
|
||||
platform-channel: windows-2025-${{ runner.arch }}-release
|
||||
source-dir: ${{ github.workspace }}/brlcad
|
||||
output-dir: ${{ runner.temp }}/bext_output
|
||||
build-type: Release
|
||||
artifact-token: ${{ secrets.BEXT_ARTIFACT_TOKEN }}
|
||||
|
||||
- name: Build Directory setup
|
||||
run: |
|
||||
cmake -E make_directory ./build_winstd
|
||||
|
||||
- name: MSVC and Ninja diagnostics
|
||||
shell: cmd
|
||||
run: |
|
||||
where cmake
|
||||
where ninja
|
||||
where cl.exe
|
||||
where msbuild
|
||||
cmake --version
|
||||
cl.exe
|
||||
set INCLUDE
|
||||
set LIB
|
||||
set LIBPATH
|
||||
|
||||
- name: Configure
|
||||
shell: cmd
|
||||
run: |
|
||||
cmake -S brlcad -B build_winstd -DBRLCAD_EXT_PARALLEL=1 -DBRLCAD_BUNDLED_LIBS=Bundled -DCMAKE_BUILD_TYPE=Release -DBRLCAD_EXT_DIR=%RUNNER_TEMP%\bext_output -DBRLCAD_ENABLE_QT=ON -DBRLCAD_CONFIG_PROBE_DIAGNOSTICS=ON -DBRLCAD_PROBE_SNAPSHOT_FILE=%GITHUB_WORKSPACE%\build_winstd\parallel-probes.txt
|
||||
|
||||
- name: Configure probe diagnostics
|
||||
if: always()
|
||||
shell: pwsh
|
||||
run: |
|
||||
$build = Join-Path $env:GITHUB_WORKSPACE 'build_winstd'
|
||||
$diagnosticDir = Join-Path $build 'CMakeTmp/probe_diagnostics'
|
||||
if (Test-Path $diagnosticDir) {
|
||||
Get-ChildItem -Path $diagnosticDir -File | Sort-Object Name | ForEach-Object {
|
||||
Write-Host "`n===== $($_.FullName) ====="
|
||||
Get-Content -Path $_.FullName
|
||||
}
|
||||
} else {
|
||||
Write-Host "No parallel-probe diagnostic directory was created."
|
||||
}
|
||||
$cmakeError = Join-Path $build 'CMakeFiles/CMakeError.log'
|
||||
if (Test-Path $cmakeError) {
|
||||
Write-Host "`n===== $cmakeError ====="
|
||||
Get-Content -Path $cmakeError
|
||||
}
|
||||
$cache = Join-Path $build 'CMakeCache.txt'
|
||||
if (Test-Path $cache) {
|
||||
Write-Host "`n===== selected cache entries ====="
|
||||
Select-String -Path $cache -Pattern '^(HAVE_CONIO_H|BRLCAD_PROBE_USE_NINJA|BRLCAD_PROBE_NINJA_EXE|BRLCAD_PROBE_VCVARS|BRLCAD_PROBE_VCVARS_ARCH):' | ForEach-Object { $_.Line }
|
||||
}
|
||||
|
||||
- name: Rebuild conio probe verbosely
|
||||
if: always()
|
||||
shell: cmd
|
||||
continue-on-error: true
|
||||
run: |
|
||||
if not exist build_winstd\CMakeTmp\INCLUDE_PROBE_build (
|
||||
echo INCLUDE_PROBE mini-project was not configured.
|
||||
exit /b 0
|
||||
)
|
||||
cmake --build build_winstd\CMakeTmp\INCLUDE_PROBE_build --config Release --target HAVE_CONIO_H --verbose
|
||||
|
||||
- name: Build
|
||||
id: build_parallel
|
||||
shell: cmd
|
||||
run: |
|
||||
cmake --build build_winstd --config Release -j2
|
||||
continue-on-error: true
|
||||
|
||||
- name: Build (serial for diagnostics)
|
||||
if: steps.build_parallel.outcome == 'failure'
|
||||
shell: cmd
|
||||
run: |
|
||||
cmake --build build_winstd --config Release --target mged
|
||||
|
||||
- name: Check
|
||||
shell: cmd
|
||||
run: |
|
||||
cmake --build build_winstd --config Release --target check -j2
|
||||
|
||||
- name: Package
|
||||
shell: cmd
|
||||
run: |
|
||||
cmake --build build_winstd --config Release --target package -j2
|
||||
|
||||
osx:
|
||||
name: macOS Clang
|
||||
needs: [linux]
|
||||
runs-on: macos-15
|
||||
strategy:
|
||||
fail-fast: true
|
||||
steps:
|
||||
- name: Setup - CMake
|
||||
uses: lukka/get-cmake@latest
|
||||
|
||||
- name: Install Xquartz
|
||||
run: |
|
||||
brew install xquartz --cask
|
||||
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v6
|
||||
with:
|
||||
path: brlcad
|
||||
|
||||
- name: Prepare bext dependencies
|
||||
uses: ./brlcad/.github/actions/prepare-bext
|
||||
with:
|
||||
platform-channel: macos-15-${{ runner.arch }}-release
|
||||
source-dir: ${{ github.workspace }}/brlcad
|
||||
output-dir: ${{ runner.temp }}/bext_output
|
||||
build-type: Release
|
||||
artifact-token: ${{ secrets.BEXT_ARTIFACT_TOKEN }}
|
||||
|
||||
- name: Build Directory setup
|
||||
run: |
|
||||
cmake -E make_directory build_osx
|
||||
cmake -E make_directory $HOME/.cache
|
||||
cmake -E make_directory $HOME/.cache/BRL-CAD
|
||||
|
||||
- name: Configure
|
||||
run: |
|
||||
export PATH=$GITHUB_WORKSPACE:$PATH
|
||||
export CC=clang
|
||||
export CXX=clang++
|
||||
cmake -S brlcad -B build_osx -DCMAKE_BUILD_TYPE=Release -DBRLCAD_EXT_DIR=${{ runner.temp }}/bext_output -DBRLCAD_ENABLE_QT=ON
|
||||
|
||||
- name: Build
|
||||
id: build_parallel
|
||||
run: |
|
||||
export PATH=$GITHUB_WORKSPACE:$PATH
|
||||
make -j2
|
||||
working-directory: ${{ github.workspace }}/build_osx
|
||||
continue-on-error: true
|
||||
|
||||
- name: Build (serial for diagnostics)
|
||||
if: steps.build_parallel.outcome == 'failure'
|
||||
run: |
|
||||
make
|
||||
working-directory: ${{ github.workspace }}/build_osx
|
||||
|
||||
- name: Check
|
||||
run: |
|
||||
export PATH=$GITHUB_WORKSPACE:$PATH
|
||||
make check
|
||||
working-directory: ${{ github.workspace }}/build_osx
|
||||
|
||||
- name: Package
|
||||
run: |
|
||||
export PATH=$GITHUB_WORKSPACE:$PATH
|
||||
make package
|
||||
working-directory: ${{ github.workspace }}/build_osx
|
||||
@@ -1,400 +0,0 @@
|
||||
# This file defines Continuous Integration (CI) tests for BRL-CAD using the
|
||||
# Github Actions framework. Currently it defines configurations for Windows,
|
||||
# Linux and OSX. These tests are run on a fixed schedule, rather than per
|
||||
# push, and will typically take longer to run.
|
||||
#
|
||||
# Tests here are intended to test more expensive integrations and longer
|
||||
# builds than the ones targeted at per-commit feedback. The tradeoff is
|
||||
# that a failure in these tests might be cause by any commit within a
|
||||
# 24 hour block of time, so the developer will need to track down the
|
||||
# specifics themselves.
|
||||
|
||||
name: Scheduled
|
||||
|
||||
on:
|
||||
schedule:
|
||||
- cron: '0 3 * * *' # daily at 03:00 UTC
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
|
||||
linux_bext:
|
||||
name: Linux - BRL-CAD bext build
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
fail-fast: true
|
||||
env:
|
||||
DEBIAN_FRONTEND: noninteractive
|
||||
steps:
|
||||
- name: Setup - CMake
|
||||
uses: lukka/get-cmake@latest
|
||||
|
||||
# Install system dependencies
|
||||
- name: Install apt dependencies
|
||||
run: |
|
||||
sudo apt-get update
|
||||
# Install X/OpenGL dev pkgs
|
||||
sudo apt-get install xserver-xorg-dev libx11-dev libxi-dev libxext-dev libglu1-mesa-dev libfontconfig-dev
|
||||
# Install tools
|
||||
sudo apt-get install astyle re2c xsltproc libxml2-utils
|
||||
# Install dependency dev pkgs
|
||||
sudo apt-get install zlib1g-dev libpng-dev libjpeg-dev libtiff-dev libeigen3-dev libgdal-dev libassimp-dev libopencv-dev tcl-dev tk-dev
|
||||
# Install XCB/OpenGL dev pkgs for Qt - see:
|
||||
# https://wiki.qt.io/Building_Qt_6_from_Git
|
||||
# https://doc.qt.io/qt-6/linux-requirements.html
|
||||
sudo apt-get install libfontconfig1-dev libfreetype6-dev libx11-dev libx11-xcb-dev libxext-dev libxfixes-dev libxi-dev libxrender-dev libxcb1-dev libxcb-cursor-dev libxcb-glx0-dev libxcb-keysyms1-dev libxcb-image0-dev libxcb-shm0-dev libxcb-icccm4-dev libxcb-sync-dev libxcb-xfixes0-dev libxcb-shape0-dev libxcb-randr0-dev libxcb-render-util0-dev libxcb-util-dev libxcb-xinerama0-dev libxcb-xkb-dev libxcb-xinput-dev libxcb-xrm-dev libxkbcommon-dev libxkbcommon-x11-dev
|
||||
sudo apt-get install libgl-dev
|
||||
sudo apt-get install libinput-dev
|
||||
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v6
|
||||
with:
|
||||
path: brlcad
|
||||
|
||||
- name: Directory setup
|
||||
run: |
|
||||
cmake -E make_directory build_linux
|
||||
cmake -E make_directory $HOME/.cache
|
||||
cmake -E make_directory $HOME/.cache/BRL-CAD
|
||||
|
||||
- name: Configure
|
||||
run: |
|
||||
export PATH=$GITHUB_WORKSPACE:$PATH
|
||||
cmake -S brlcad -B build_linux -G Ninja -DCMAKE_BUILD_TYPE=Release -DBRLCAD_EXT_PARALLEL=1 -DBRLCAD_BEXT_CLEANUP=ON -DBRLCAD_ENABLE_QT=ON
|
||||
|
||||
- name: Build + Check + Package
|
||||
run: |
|
||||
export PATH=$GITHUB_WORKSPACE:$PATH
|
||||
cmake --build build_linux --config Release --target check
|
||||
cmake --build build_linux --config Release --target package
|
||||
|
||||
windows_bext:
|
||||
name: MSVC - Ninja - BRL-CAD bext build
|
||||
needs: [linux_bext]
|
||||
runs-on: windows-latest
|
||||
strategy:
|
||||
fail-fast: true
|
||||
if: ${{ !cancelled() }}
|
||||
steps:
|
||||
- name: Setup - CMake
|
||||
uses: lukka/get-cmake@latest
|
||||
|
||||
- name: Add msbuild to PATH
|
||||
uses: microsoft/setup-msbuild@v3
|
||||
|
||||
- name: Add cl.exe to PATH
|
||||
uses: ilammy/msvc-dev-cmd@v1
|
||||
|
||||
- name: Add github workspace to path
|
||||
shell: powershell
|
||||
run: Add-Content -Path $env:GITHUB_PATH -Value $env:GITHUB_WORKSPACE
|
||||
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v6
|
||||
with:
|
||||
path: brlcad
|
||||
|
||||
- name: Build Directory setup
|
||||
run: cmake -E make_directory ./build_winninja
|
||||
|
||||
- name: Configure
|
||||
shell: powershell
|
||||
run: |
|
||||
cmake -S brlcad -B build_winninja -G Ninja -DCMAKE_C_COMPILER="cl.exe" -DCMAKE_CXX_COMPILER="cl.exe" -DCMAKE_BUILD_TYPE=Release -DBRLCAD_EXT_PARALLEL=1 -DBRLCAD_BEXT_CLEANUP=ON -DBRLCAD_ENABLE_QT=ON
|
||||
|
||||
- name: Build
|
||||
shell: powershell
|
||||
run: |
|
||||
ninja -j1 -v
|
||||
working-directory: ${{ github.workspace }}/build_winninja
|
||||
|
||||
- name: Check
|
||||
shell: powershell
|
||||
run: |
|
||||
ninja check -v
|
||||
working-directory: ${{ github.workspace }}/build_winninja
|
||||
|
||||
- name: Package
|
||||
shell: powershell
|
||||
run: |
|
||||
ninja package
|
||||
working-directory: ${{ github.workspace }}/build_winninja
|
||||
|
||||
windows_std_tools_bext:
|
||||
name: MSVC - Standard Tools - BRL-CAD bext build
|
||||
needs: [windows_bext]
|
||||
runs-on: windows-latest
|
||||
strategy:
|
||||
fail-fast: true
|
||||
if: ${{ !cancelled() }}
|
||||
steps:
|
||||
- name: Setup - CMake
|
||||
uses: lukka/get-cmake@latest
|
||||
|
||||
- name: Add msbuild to PATH
|
||||
uses: microsoft/setup-msbuild@v3
|
||||
|
||||
- name: Add cl.exe to PATH
|
||||
uses: ilammy/msvc-dev-cmd@v1
|
||||
|
||||
- name: Add github workspace to path
|
||||
shell: cmd
|
||||
run: echo %GITHUB_WORKSPACE%>>"%GITHUB_PATH%"
|
||||
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v6
|
||||
with:
|
||||
path: brlcad
|
||||
|
||||
- name: Build Directory setup
|
||||
run: |
|
||||
cmake -E make_directory ./build_winstd
|
||||
|
||||
- name: Configure
|
||||
shell: cmd
|
||||
run: |
|
||||
where cmake
|
||||
where ninja
|
||||
where cl.exe
|
||||
where msbuild
|
||||
cmake -S brlcad -B build_winstd -DBRLCAD_EXT_PARALLEL=1 -DBRLCAD_BUNDLED_LIBS=Bundled -DCMAKE_BUILD_TYPE=Release -DBRLCAD_BEXT_CLEANUP=ON -DBRLCAD_ENABLE_QT=ON
|
||||
|
||||
- name: Build
|
||||
shell: cmd
|
||||
run: |
|
||||
cmake --build build_winstd --config Release --target mged
|
||||
|
||||
- name: Check
|
||||
shell: cmd
|
||||
run: |
|
||||
cmake --build build_winstd --config Release --target check
|
||||
|
||||
- name: Package
|
||||
shell: cmd
|
||||
run: |
|
||||
cmake --build build_winstd --config Release --target package
|
||||
|
||||
osx_bext:
|
||||
name: macOS - BRL-CAD bext build
|
||||
needs: [linux_bext]
|
||||
runs-on: macos-15
|
||||
strategy:
|
||||
fail-fast: true
|
||||
if: ${{ !cancelled() }}
|
||||
steps:
|
||||
- name: Setup - CMake
|
||||
uses: lukka/get-cmake@latest
|
||||
|
||||
- name: Install Xquartz
|
||||
run: |
|
||||
brew install xquartz --cask
|
||||
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v6
|
||||
with:
|
||||
path: brlcad
|
||||
|
||||
- name: Build Directory setup
|
||||
run: |
|
||||
cmake -E make_directory build_osx
|
||||
cmake -E make_directory $HOME/.cache
|
||||
cmake -E make_directory $HOME/.cache/BRL-CAD
|
||||
|
||||
- name: Configure
|
||||
run: |
|
||||
export PATH=$GITHUB_WORKSPACE:$PATH
|
||||
export CC=clang
|
||||
export CXX=clang++
|
||||
cmake -S brlcad -B build_osx -DCMAKE_BUILD_TYPE=Release -DBRLCAD_EXT_PARALLEL=1 -DBRLCAD_BEXT_CLEANUP=ON -DBRLCAD_ENABLE_QT=ON
|
||||
|
||||
- name: Build
|
||||
run: |
|
||||
make
|
||||
working-directory: ${{ github.workspace }}/build_osx
|
||||
|
||||
- name: Check
|
||||
run: |
|
||||
make check
|
||||
working-directory: ${{ github.workspace }}/build_osx
|
||||
|
||||
- name: Package
|
||||
run: |
|
||||
make package
|
||||
working-directory: ${{ github.workspace }}/build_osx
|
||||
|
||||
linux_static:
|
||||
name: Clang Static Analyser
|
||||
needs: [linux_bext]
|
||||
runs-on: ubuntu-24.04
|
||||
strategy:
|
||||
fail-fast: true
|
||||
env:
|
||||
DEBIAN_FRONTEND: noninteractive
|
||||
if: ${{ !cancelled() && github.ref == 'refs/heads/main' }}
|
||||
steps:
|
||||
- name: Setup - CMake
|
||||
uses: lukka/get-cmake@latest
|
||||
|
||||
# Setup hint from https://github.com/darktable-org/rawspeed/blob/develop/.github/workflows/ci-static-analysis.yml
|
||||
- name: Clang Static Analyzer Setup
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install clang-18 clang-tools-18
|
||||
# Install X/OpenGL dev pkgs
|
||||
sudo apt-get install xserver-xorg-dev libx11-dev libxi-dev libxext-dev libglu1-mesa-dev libfontconfig-dev
|
||||
# Install tools
|
||||
sudo apt-get install astyle re2c xsltproc libxml2-utils
|
||||
# Install dependency dev pkgs
|
||||
sudo apt-get install zlib1g-dev libpng-dev libjpeg-dev libtiff-dev libeigen3-dev libgdal-dev libassimp-dev libopencv-dev tcl-dev tk-dev
|
||||
# Install XCB/OpenGL dev pkgs for Qt - see:
|
||||
# https://wiki.qt.io/Building_Qt_6_from_Git
|
||||
# https://doc.qt.io/qt-6/linux-requirements.html
|
||||
sudo apt-get install libfontconfig1-dev libfreetype6-dev libx11-dev libx11-xcb-dev libxext-dev libxfixes-dev libxi-dev libxrender-dev libxcb1-dev libxcb-cursor-dev libxcb-glx0-dev libxcb-keysyms1-dev libxcb-image0-dev libxcb-shm0-dev libxcb-icccm4-dev libxcb-sync-dev libxcb-xfixes0-dev libxcb-shape0-dev libxcb-randr0-dev libxcb-render-util0-dev libxcb-util-dev libxcb-xinerama0-dev libxcb-xkb-dev libxcb-xinput-dev libxcb-xrm-dev libxkbcommon-dev libxkbcommon-x11-dev
|
||||
sudo apt-get install libgl-dev
|
||||
sudo apt-get install libinput-dev # Cleanup
|
||||
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v6
|
||||
with:
|
||||
path: brlcad
|
||||
|
||||
- name: Prepare bext dependencies
|
||||
uses: ./brlcad/.github/actions/prepare-bext
|
||||
with:
|
||||
platform-channel: ubuntu-24.04-${{ runner.arch }}-release
|
||||
source-dir: ${{ github.workspace }}/brlcad
|
||||
output-dir: ${{ runner.temp }}/bext_output
|
||||
build-type: Release
|
||||
artifact-token: ${{ secrets.BEXT_ARTIFACT_TOKEN }}
|
||||
|
||||
- name: Directory setup
|
||||
run: |
|
||||
cmake -E make_directory build_clangstatic
|
||||
cmake -E make_directory $HOME/.cache
|
||||
cmake -E make_directory $HOME/.cache/BRL-CAD
|
||||
working-directory: ${{ github.workspace }}/brlcad
|
||||
|
||||
- name: Run Analyzer
|
||||
env:
|
||||
BRLCAD_EXT_DIR: ${{ runner.temp }}/bext_output
|
||||
run: |
|
||||
export PATH=$GITHUB_WORKSPACE:/usr/share/clang/scan-build-18/bin:/usr/share/clang/scan-build-18/libexec:$PATH
|
||||
cp $GITHUB_WORKSPACE/brlcad/misc/clang-static-analyzer-run.sh .
|
||||
./clang-static-analyzer-run.sh
|
||||
working-directory: ${{ github.workspace }}/brlcad/build_clangstatic
|
||||
|
||||
- name: Summary
|
||||
if: success() || failure()
|
||||
run: |
|
||||
sudo apt-get install html2text
|
||||
html2text scan-reports-all/*/index.html
|
||||
working-directory: ${{ github.workspace }}/brlcad/build_clangstatic
|
||||
|
||||
|
||||
# See https://app.codecov.io/gh/BRL-CAD/brlcad for analysis results
|
||||
linux_cov:
|
||||
name: LCOV Coverage testing
|
||||
needs: [linux_bext]
|
||||
runs-on: ubuntu-24.04
|
||||
strategy:
|
||||
fail-fast: true
|
||||
env:
|
||||
DEBIAN_FRONTEND: noninteractive
|
||||
if: ${{ !cancelled() && github.ref == 'refs/heads/main' }}
|
||||
steps:
|
||||
- name: Setup - CMake
|
||||
uses: lukka/get-cmake@latest
|
||||
|
||||
- name: Setup - System
|
||||
run: |
|
||||
sudo apt-get update
|
||||
# Get the lcov tool and its dependencies
|
||||
sudo apt-get install lcov gdb
|
||||
# Install X/OpenGL dev pkgs
|
||||
sudo apt-get install xserver-xorg-dev libx11-dev libxi-dev libxext-dev libglu1-mesa-dev libfontconfig-dev
|
||||
# Install tools
|
||||
sudo apt-get install astyle re2c xsltproc libxml2-utils
|
||||
# Install dependency dev pkgs
|
||||
sudo apt-get install zlib1g-dev libpng-dev libjpeg-dev libtiff-dev libeigen3-dev libgdal-dev libassimp-dev libopencv-dev tcl-dev tk-dev
|
||||
# Install XCB/OpenGL dev pkgs for Qt - see:
|
||||
# https://wiki.qt.io/Building_Qt_6_from_Git
|
||||
# https://doc.qt.io/qt-6/linux-requirements.html
|
||||
sudo apt-get install libfontconfig1-dev libfreetype6-dev libx11-dev libx11-xcb-dev libxext-dev libxfixes-dev libxi-dev libxrender-dev libxcb1-dev libxcb-cursor-dev libxcb-glx0-dev libxcb-keysyms1-dev libxcb-image0-dev libxcb-shm0-dev libxcb-icccm4-dev libxcb-sync-dev libxcb-xfixes0-dev libxcb-shape0-dev libxcb-randr0-dev libxcb-render-util0-dev libxcb-util-dev libxcb-xinerama0-dev libxcb-xkb-dev libxcb-xinput-dev libxcb-xrm-dev libxkbcommon-dev libxkbcommon-x11-dev
|
||||
sudo apt-get install libgl-dev
|
||||
sudo apt-get install libinput-dev
|
||||
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v6
|
||||
with:
|
||||
path: brlcad
|
||||
|
||||
- name: Prepare bext dependencies
|
||||
uses: ./brlcad/.github/actions/prepare-bext
|
||||
with:
|
||||
platform-channel: ubuntu-24.04-${{ runner.arch }}-release
|
||||
source-dir: ${{ github.workspace }}/brlcad
|
||||
output-dir: ${{ runner.temp }}/bext_output
|
||||
build-type: Release
|
||||
artifact-token: ${{ secrets.BEXT_ARTIFACT_TOKEN }}
|
||||
|
||||
- name: Directory setup
|
||||
run: |
|
||||
cmake -E make_directory build_lcov
|
||||
cmake -E make_directory $HOME/.cache
|
||||
cmake -E make_directory $HOME/.cache/BRL-CAD
|
||||
|
||||
- name: Configure
|
||||
run: |
|
||||
export PATH=$GITHUB_WORKSPACE:$PATH
|
||||
cmake -S brlcad -B build_lcov -DBRLCAD_ENABLE_COVERAGE=ON -DCMAKE_BUILD_TYPE=Debug -DBRLCAD_EXT_DIR=${{ runner.temp }}/bext_output -DBRLCAD_ENABLE_QT=ON
|
||||
|
||||
- name: Build
|
||||
id: build_parallel
|
||||
run: |
|
||||
export PATH=$GITHUB_WORKSPACE:$PATH
|
||||
cmake --build build_lcov -j2
|
||||
continue-on-error: true
|
||||
|
||||
- name: Build (serial for diagnostics)
|
||||
if: steps.build_parallel.outcome == 'failure'
|
||||
run: |
|
||||
export PATH=$GITHUB_WORKSPACE:$PATH
|
||||
cmake --build build_lcov -j1
|
||||
|
||||
- name: Run Tests
|
||||
id: coverage_tests
|
||||
run: |
|
||||
find . -name '*.gcda' -exec rm {} \;
|
||||
cmake --build . --target check
|
||||
working-directory: ${{ github.workspace }}/build_lcov
|
||||
|
||||
- name: Diagnose failed annotation test
|
||||
if: failure() && steps.coverage_tests.outcome == 'failure'
|
||||
continue-on-error: true
|
||||
run: |
|
||||
set +e
|
||||
ctest -R '^rt_datum_annot_semantics$' -VV
|
||||
cat Testing/Temporary/LastTest.log
|
||||
if command -v gdb >/dev/null 2>&1; then
|
||||
gdb --quiet --batch \
|
||||
-ex 'set pagination off' \
|
||||
-ex run \
|
||||
-ex 'thread apply all bt full' \
|
||||
--args ./src/librt/tests/rt_datum_annot_semantics
|
||||
fi
|
||||
working-directory: ${{ github.workspace }}/build_lcov
|
||||
|
||||
- name: Capture Coverage
|
||||
run: |
|
||||
lcov --capture --directory . --output-file coverage.info
|
||||
lcov -r coverage.info \*\/bext_output\/\* > coverage-2.info
|
||||
lcov -r coverage-2.info \/usr\/\* > coverage_cad.info
|
||||
rm coverage-*.info
|
||||
mv coverage_cad.info ..
|
||||
working-directory: ${{ github.workspace }}/build_lcov
|
||||
|
||||
- name: Upload
|
||||
uses: codecov/codecov-action@v4
|
||||
with:
|
||||
files: ./coverage_cad.info
|
||||
|
||||
+2
-41
@@ -1,41 +1,2 @@
|
||||
# Common build directories used in the source tree
|
||||
/build*
|
||||
/.build*
|
||||
/*_build*
|
||||
/*-build*
|
||||
/out
|
||||
|
||||
# Temporary files
|
||||
*~
|
||||
\#*\#
|
||||
.\#*
|
||||
[._]*.s[a-v][a-z]
|
||||
[._]*.sw[a-p]
|
||||
[._]s[a-v][a-z]
|
||||
[._]sw[a-p]
|
||||
|
||||
# OS specific files
|
||||
.DS_Store
|
||||
.DS_Store?
|
||||
|
||||
# CMake supports some configuration files to allow users a convenient way to pre-define
|
||||
# sets of configuration options:
|
||||
# https://cmake.org/cmake/help/latest/manual/cmake-presets.7.html
|
||||
/CMakeUserPresets.json
|
||||
|
||||
# Visual Studio (note that CMakePresets.json is recommended instead of
|
||||
# CMakeSettings.json for Visual Studio going forward)
|
||||
# https://learn.microsoft.com/en-us/cpp/build/cmake-presets-vs
|
||||
# https://learn.microsoft.com/en-us/cpp/build/customize-cmake-settings
|
||||
/.vs
|
||||
.vscode
|
||||
/CMakeSettings.json
|
||||
|
||||
#Qt Creator
|
||||
CMakeLists.txt.user
|
||||
|
||||
# Misc
|
||||
.clang-format
|
||||
*__pycache__*
|
||||
|
||||
|
||||
/bin
|
||||
/lib
|
||||
|
||||
@@ -1,32 +0,0 @@
|
||||
# Code Quality Standards
|
||||
|
||||
Write code as a senior engineer would for long-term maintenance. These are non-negotiable defaults, not suggestions to apply when asked.
|
||||
|
||||
## Principles
|
||||
|
||||
- **DRY.** Extract duplicate logic. Refactor. Once and only once.
|
||||
- **Minimize surprises.** Preserve existing style and conventions. Test when you can.
|
||||
- **No magic values.** Use named constants, enums, or configuration. Every literal needs justification.
|
||||
- **Minimize scope.** Prefer tightest scope that works - local variables, parameters, encapsulation. Broader scope needs justification.
|
||||
- **No dead code.** Delete commented-out code, unused variables, unreachable branches. Version control remembers.
|
||||
- **Comments explain why.** Document intent, constraints, and non-obvious decisions. Use "what" summaries only for complex or non-obvious algorithms. If routine code needs a comment to explain it, the code should be clearer.
|
||||
- **Clean up what you touch.** Improve code you are changing: rename unclear variables, extract functions, simplify conditionals. Do not mix unrelated cleanup with logic changes - separate concerns, separate commits.
|
||||
- **Handle errors deliberately.** Whether failing loudly or quietly, make it an intentional choice. No accidental swallowing.
|
||||
- **YAGNI.** Do not add speculative abstractions, unused parameters, or unplanned extension points. Build what is needed now. Refactor when requirements actually change.
|
||||
- **Perfection is when there is nothing left to take away.** Prefer reduction over addition, simpler is better. Too clever to debug easily is too clever.
|
||||
|
||||
## Before Finishing
|
||||
|
||||
Review your changes for code smells, duplicated logic, hardcoded values, overly broad scope, unclear names, missing error handling, unnecessary complexity, etc. Fix issues in the same pass - do not defer cleanup.
|
||||
|
||||
## Git
|
||||
|
||||
Never commit without permission (ask every time). Never push to remote. Never use `codex`, `chatgpt`, `openai`, `gemini`, `antigravity`, `copilot`, `claude`, `llm`, `ai`, or similar terms in branch names, tag names, commits, PRs, comments, and other metadata. Do not add generated-by notices or otherwise indicate authorship unless user explicitly requests. Do not include specific machine information - full file system paths, machine names, IP addresses, or other identifiable information in commit messages, code, comments or documentation.
|
||||
|
||||
## Repository Coding Conventions
|
||||
|
||||
The HACKING file in the root of the source tree defines coding conventions specific to BRL-CAD, including versions of common functions that are used in our code base instead of raw standard functions. Review this file before writing code so your changes and additions adhere to BRL-CAD standards.
|
||||
|
||||
BRL-CAD code should typically use our ZERO and EQUAL macros rather than raw floating-point equality comparisons to avoid Werror=float-equal compilation failures on expressions such as a == 0.0 (should be ZERO(a)) or b != c (should be !EQUAL(b, c)).
|
||||
|
||||
When completing a code change (not for intermediate iterations, but when preparing to hand back a finalized change) use our regress-repository and regress-licenses build targets to check that the result satisfies our internal checkers.
|
||||
@@ -37,7 +37,7 @@ contributor credits are organized into the following general
|
||||
categories depending on the level and type of involvement:
|
||||
|
||||
* Mathematical, Algorithmic, and Geometric Support
|
||||
* Documentation, Artwork, and Website Contributors
|
||||
* Documentation and Website Contributors
|
||||
* Code Contributors
|
||||
* Special Thanks
|
||||
|
||||
@@ -111,7 +111,7 @@ Hanes, Jeff
|
||||
U.S. Army Ballistic Research Laboratory
|
||||
U.S. Army Research Laboratory
|
||||
|
||||
Johnson, Christopher T.
|
||||
Johnson, Christopher T. <cjohnson@cyberpaladin.com>
|
||||
nicknames cjohnson
|
||||
1989 February
|
||||
Cray Research, Inc.
|
||||
@@ -119,7 +119,7 @@ Geometric Solutions, Inc.
|
||||
Paladin Software
|
||||
JRMTech, Inc.
|
||||
|
||||
Butler, Lee A.
|
||||
Butler, Lee A. <butler@arl.army.mil>
|
||||
nicknames butler, lbutler
|
||||
1989 July
|
||||
U.S. Army Ballistic Research Laboratory
|
||||
@@ -131,7 +131,7 @@ nicknames pjt
|
||||
U.S. Army Ballistic Research Laboratory
|
||||
U.S. Army Research Laboratory
|
||||
|
||||
Markowski, Michael J.
|
||||
Markowski, Michael J. <michael.markowski@arl.army.mil>
|
||||
nicknames mmark, mm
|
||||
1991 June
|
||||
U.S. Army Ballistic Research Laboratory
|
||||
@@ -141,7 +141,7 @@ nicknames gdurf
|
||||
1992 August
|
||||
ARL Student Hire / Carnegie Mellon University
|
||||
|
||||
Anderson, John R.
|
||||
Anderson, John R. <jra@arl.army.mil>
|
||||
nicknames jra, johnranderson
|
||||
1993 May
|
||||
U.S. Army Ballistic Research Laboratory
|
||||
@@ -154,14 +154,14 @@ nicknames adam
|
||||
1995 October
|
||||
Geometric Solutions, Inc.
|
||||
|
||||
Parker, Robert G.
|
||||
Parker, Robert G. **
|
||||
nicknames include bparker, bob1961
|
||||
1995 January
|
||||
U.S. Army Research Laboratory
|
||||
SURVICE Engineering, Inc.
|
||||
Open Source
|
||||
|
||||
Morrison, Christopher Sean <morrison@brlcad.org>
|
||||
Morrison, Christopher Sean <morrison@brlcad.org> **
|
||||
nicknames sean, morrison, brlcad
|
||||
1998 December
|
||||
ARL Student Hire / Johns Hopkins University
|
||||
@@ -178,7 +178,7 @@ nicknames tranese
|
||||
2001 March
|
||||
U.S. Army Research Laboratory
|
||||
|
||||
Hartley, Robert F.
|
||||
Hartley, Robert F. <hartley@vt.edu>
|
||||
nicknames hartley
|
||||
2002 August
|
||||
ARL Student Hire / Virginia Tech
|
||||
@@ -189,52 +189,35 @@ nicknames twingy, justin
|
||||
Quantum Research International, Inc.
|
||||
U.S. Army Research Laboratory
|
||||
|
||||
Greenwald, Erik
|
||||
Greenwald, Erik <erikg@arl.army.mil> **
|
||||
nicknames erikg, erikgreenwald
|
||||
2003 November
|
||||
U.S. Army Research Laboratory
|
||||
Open Source
|
||||
|
||||
Roßberg, Daniel
|
||||
Roßberg, Daniel **
|
||||
nicknames d_rossberg
|
||||
2005 June
|
||||
Industrieanlagen-Betriebsgesellschaft mbH (IABG)
|
||||
Open Source
|
||||
|
||||
Yapp, Cliff
|
||||
Yapp, Cliff **
|
||||
nicknames starseeker
|
||||
2007 September
|
||||
Open Source
|
||||
Quantum Research International, Inc.
|
||||
U.S. Army Research Laboratory
|
||||
|
||||
Bowman, W. Keith
|
||||
Bowman, W. Keith **
|
||||
nicknames indianlarry
|
||||
SURVICE Engineering, Inc.
|
||||
U.S. Army Research Laboratory
|
||||
|
||||
Weiss, Richard
|
||||
Weiss, Richard **
|
||||
nicknames r_weiss
|
||||
2008 December
|
||||
U.S. Army Research Laboratory
|
||||
|
||||
Browder, Thomas M. Jr.
|
||||
nicknames tbrowder2
|
||||
2008 June
|
||||
ManTech International Corporation
|
||||
Open Source
|
||||
|
||||
Reed, Nicholas
|
||||
nicknames n_reed
|
||||
2008 July
|
||||
ARL Student Hire / University of Maryland, Baltimore County
|
||||
Quantum Research International, Inc.
|
||||
|
||||
Moore, Jr., Carl G.
|
||||
nicknames cmoore, carlmoore
|
||||
2011 October
|
||||
U.S. Army Research Laboratory
|
||||
|
||||
|
||||
MATHEMATICAL, ALGORITHMIC, AND GEOMETRIC SUPPORT
|
||||
------------------------------------------------
|
||||
@@ -243,10 +226,10 @@ Weaver, Earl P.
|
||||
1980
|
||||
U.S. Army Ballistic Research Laboratory
|
||||
|
||||
Davisson, Edwin O.
|
||||
Davisson, Edwin O. **
|
||||
U.S. Army Research Laboratory
|
||||
|
||||
Rogers, David
|
||||
Rodgers, David
|
||||
U.S. Naval Academy
|
||||
|
||||
Stiller, Peter
|
||||
@@ -260,16 +243,16 @@ U.S. Army Ballistic Research Laboratory
|
||||
Applin, Keith A.
|
||||
U.S. Army Research Laboratory
|
||||
|
||||
Kregel, Dwayne
|
||||
Kregel, Dwayne **
|
||||
SURVICE Engineering, Inc.
|
||||
|
||||
Weaver, Stephanie 'Rain'
|
||||
Weaver, Stephanie 'Rain' **
|
||||
2009 June
|
||||
ARL Student Hire / Bridgewater College
|
||||
|
||||
|
||||
DOCUMENTATION, ARTWORK, AND WEBSITE CONTRIBUTORS
|
||||
------------------------------------------------
|
||||
DOCUMENTATION AND WEBSITE CONTRIBUTORS
|
||||
--------------------------------------
|
||||
|
||||
Weaver, Earl P.
|
||||
1980
|
||||
@@ -279,7 +262,6 @@ Schueler, Betty J.
|
||||
|
||||
Edwards, Eric
|
||||
SURVICE Engineering, Inc.
|
||||
Open Source (Doc Camp)
|
||||
|
||||
Kregel, Dwayne
|
||||
SURVICE Engineering, Inc.
|
||||
@@ -335,69 +317,6 @@ Perez, Alex
|
||||
2012 November
|
||||
Open Source (GCI)
|
||||
|
||||
Singh, Harmanpreet
|
||||
nicknames harmanpreet
|
||||
2013 October
|
||||
Open Source (Doc Camp)
|
||||
|
||||
Kamga, Isaac
|
||||
nicknames Izak, iiizzzaaakkk
|
||||
2013 October
|
||||
Open Source (Doc Camp)
|
||||
|
||||
Check, Nyah
|
||||
nicknames Ch3ck
|
||||
2013 October
|
||||
Open Source (Doc Camp)
|
||||
|
||||
Scott Nesbitt
|
||||
2013 October
|
||||
Open Source (Doc Camp)
|
||||
|
||||
Wood, David
|
||||
2013 November
|
||||
Open Source (GCI)
|
||||
|
||||
Agarwal, Yatharth
|
||||
2013 November
|
||||
Open Source (GCI)
|
||||
|
||||
McDonald, Rob
|
||||
2013 November
|
||||
Open Source
|
||||
|
||||
Roberts, Mitchell
|
||||
2014 July
|
||||
U.S. Army Research Laboratory
|
||||
|
||||
Tannous, Marc
|
||||
2014 December
|
||||
Open Source (GCI)
|
||||
|
||||
Chiplunkar, Shardul
|
||||
nicknames microchip, shardulc
|
||||
2014 December
|
||||
Open Source (GCI)
|
||||
|
||||
Juvekar, Mandar
|
||||
nicknames mandarj
|
||||
2014 December
|
||||
Open Source (GCI)
|
||||
|
||||
Sofat, Hitesh
|
||||
nicknames sofat
|
||||
2015 June
|
||||
Open Source (GSoC)
|
||||
|
||||
Sieu, Jeff
|
||||
2017 December
|
||||
Open Source (GCI)
|
||||
|
||||
Baker, Josh
|
||||
nicknames joshbaker22
|
||||
2023 August
|
||||
U.S. Army Research Laboratory
|
||||
|
||||
|
||||
CODE CONTRIBUTIONS
|
||||
------------------
|
||||
@@ -526,9 +445,7 @@ nicknames mjgillich mgillich
|
||||
U.S. Army Research Laboratory
|
||||
|
||||
Howard, Doug
|
||||
nicknames dhoward
|
||||
SURVICE Engineering, Inc.
|
||||
2006 April
|
||||
|
||||
Silva, Prasad Prometheus
|
||||
nicknames prasad_silva
|
||||
@@ -581,8 +498,19 @@ nicknames homovulgaris, madant
|
||||
2008 June
|
||||
Open Source (GSoC)
|
||||
|
||||
Browder, Thomas M. Jr.
|
||||
nicknames tbrowder2
|
||||
2008 June
|
||||
ManTech International Corporation
|
||||
Open Source
|
||||
|
||||
Reed, Nicholas
|
||||
nicknames n_reed
|
||||
2008 July
|
||||
ARL Student Hire / University of Maryland, Baltimore County
|
||||
|
||||
Saunders, Benjamin
|
||||
nicknames Ralith, ralith
|
||||
nicknames Ralith
|
||||
2008 July
|
||||
Open Source
|
||||
|
||||
@@ -608,11 +536,6 @@ nicknames Alexandrus
|
||||
2010 July
|
||||
Open Source
|
||||
|
||||
Pal, Csanyi
|
||||
nicknames csanyi_pal
|
||||
2010 July
|
||||
Open Source
|
||||
|
||||
Hinesley, Brandon
|
||||
nicknames bhinesley
|
||||
2011 March
|
||||
@@ -627,10 +550,6 @@ Jain, Sachin
|
||||
2011 April
|
||||
Open Source
|
||||
|
||||
Gerstner, Nick
|
||||
2011 May
|
||||
SURVICE Engineering, Inc.
|
||||
|
||||
Easterbrook, Zach
|
||||
nicknames lainiwakurax
|
||||
2011 July
|
||||
@@ -641,6 +560,11 @@ nicknames abhi2011
|
||||
2011 July
|
||||
Open Source (SOCIS)
|
||||
|
||||
Moore, Jr., Carl G.
|
||||
nicknames cmoore, carlmoore
|
||||
2011 October
|
||||
U.S. Army Research Laboratory
|
||||
|
||||
Silvko, Ksenija
|
||||
nicknames ksuzee
|
||||
2012 March
|
||||
@@ -727,7 +651,6 @@ Calle, Adrián Arroyo
|
||||
Open Source (GCI)
|
||||
|
||||
Keesing, Aaron
|
||||
nicknames agkphysics
|
||||
2012 December
|
||||
Open Source (GCI)
|
||||
|
||||
@@ -735,21 +658,11 @@ Govindjee, Arjun
|
||||
2012 December
|
||||
Open Source (GCI)
|
||||
|
||||
Ramirez, Daniel
|
||||
nicknames javamonn
|
||||
2012 December
|
||||
Open Source (GCI)
|
||||
|
||||
Nagy, Csaba
|
||||
nicknames ncsaba
|
||||
2013 April
|
||||
Open Source
|
||||
|
||||
Check, Nyah
|
||||
nicknames Ch3ck
|
||||
2013 July
|
||||
Open Source (GSoC)
|
||||
|
||||
Shah, Kesha
|
||||
nicknames keshashah
|
||||
2013 April
|
||||
@@ -766,338 +679,19 @@ nicknames avneetkhalsa
|
||||
Open Source (GSoC)
|
||||
|
||||
Daga, Mohit
|
||||
nicknames zero_level, mohitdaga
|
||||
nicknames zero_level
|
||||
2013 June
|
||||
Open Source (GSoC)
|
||||
|
||||
Kamga, Isaac
|
||||
nicknames Izak, iiizzzaaakkk
|
||||
2013 July
|
||||
Open Source (GSoC)
|
||||
|
||||
Singh, Harmanpreet
|
||||
nicknames harmanpreet
|
||||
2013 May
|
||||
Open Source (GSoC)
|
||||
|
||||
Huff, Emory
|
||||
nicknames hknoll
|
||||
2013 July
|
||||
ARL Student Hire
|
||||
U.S. Army Research Laboratory (SEAP)
|
||||
|
||||
Engbert, Jonathan
|
||||
nicknames ejno
|
||||
2013 July
|
||||
Open Source
|
||||
ARL Student Hire / University of Maryland, Baltimore County
|
||||
|
||||
Andrew
|
||||
2013 November
|
||||
Open Source (GCI)
|
||||
|
||||
Schulte, Johannes
|
||||
2013 November
|
||||
Open Source (GCI)
|
||||
|
||||
Amidon, Peter
|
||||
nicknames peter-sa, Andromeda Galaxy
|
||||
2013 November
|
||||
Open Source (GCI)
|
||||
|
||||
Chiplunkar, Shardul
|
||||
nicknames microchip
|
||||
2013 November
|
||||
Open Source (GCI)
|
||||
|
||||
Берегов, Станислав
|
||||
2013 December
|
||||
Open Source (GCI)
|
||||
|
||||
nicknames huskmate13
|
||||
2014 January
|
||||
Open Source
|
||||
|
||||
Granroth, Gustave
|
||||
2014 May
|
||||
Open Source
|
||||
|
||||
Jain, Rishub
|
||||
2014 July
|
||||
ARL Student Hire
|
||||
|
||||
Roberts, Mitchell
|
||||
2014 July
|
||||
ARL Student Hire
|
||||
|
||||
Bayes, Matthew
|
||||
nicknames klinger4077
|
||||
2014 July
|
||||
ARL Student Hire / University of Maryland College Park
|
||||
|
||||
Mirea, Ștefan-Gabriel
|
||||
2014 October
|
||||
Open Source
|
||||
|
||||
Krishna
|
||||
2015 January
|
||||
Open Source (GCI)
|
||||
|
||||
Konrad, Djimeli
|
||||
2015 February
|
||||
Open Source
|
||||
|
||||
Alexandre da Silva Costa, Vasco
|
||||
nicknames vasco_costa
|
||||
2015 April
|
||||
Open Source (GSoC)
|
||||
|
||||
Thakkar, Kalpit
|
||||
nicknames dracarys983
|
||||
2015 May
|
||||
Open Source (GSoC)
|
||||
|
||||
Ilinca, Andrei
|
||||
nicknames andrei_il
|
||||
2015 June
|
||||
Open Source (GSoC)
|
||||
|
||||
Sofat, Hitesh
|
||||
nicknames sofat
|
||||
2015 June
|
||||
Open Source (GSoC)
|
||||
|
||||
Hollister, Brad
|
||||
nicknames bhollister
|
||||
2015 July
|
||||
Open Source (GSoC)
|
||||
|
||||
Hanji, Param
|
||||
2016 March
|
||||
Open Source (GSoC)
|
||||
|
||||
Wu, Bojian
|
||||
2016 June
|
||||
Open Source (GSoC)
|
||||
|
||||
Bagavathy, Rakshika
|
||||
nicknames tandoorichick
|
||||
2016 October
|
||||
Open Source (GSoC)
|
||||
|
||||
Gao, Tianyue
|
||||
2016 December
|
||||
Open Source (GCI)
|
||||
|
||||
Rathore, Shubham
|
||||
nicknames gabbar1947
|
||||
2017 April
|
||||
Open Source
|
||||
|
||||
nicknames Rakete1111
|
||||
2017 November
|
||||
Open Source
|
||||
|
||||
Narayan, Saran
|
||||
nicknames sharannyn
|
||||
2018 April
|
||||
Open Source (GSoC)
|
||||
|
||||
Shinde, Chetan
|
||||
nicknames chetanshinde911
|
||||
2019 April
|
||||
Open Source (GSoC)
|
||||
|
||||
Haydar, Ali
|
||||
nicknames lois221 lgoogl696 LouisGoogl
|
||||
2019 May
|
||||
Open Source (GSoC)
|
||||
|
||||
Nayak, Himanshu
|
||||
nicknames himanshu40
|
||||
2020 January
|
||||
Open Source (GSoC)
|
||||
|
||||
Suthar, Rishabh
|
||||
nicknames yamhai, rishabhsuthar32
|
||||
2020 March
|
||||
Open Source (GSoC)
|
||||
|
||||
Vaidya, Sahil
|
||||
nicknames sahilvaidya99
|
||||
2020 April
|
||||
ARL Student Hire / University of Texas at Austin
|
||||
|
||||
Das, Sumagna
|
||||
nicknames sumagnadas
|
||||
2020 May
|
||||
Open Source
|
||||
|
||||
Atreya, Vikram
|
||||
nicknames vikram-atreya
|
||||
2020 October
|
||||
Open Source
|
||||
|
||||
Dinges, Trey
|
||||
nicknames treydinges
|
||||
2021 October
|
||||
Texas A&M University
|
||||
|
||||
Connelly, Cole D.
|
||||
nicknames cdconn00
|
||||
2021 October
|
||||
Texas A&M University
|
||||
|
||||
Olivarez, Vincent
|
||||
nicknames volivarez60
|
||||
2021 October
|
||||
Texas A&M University
|
||||
|
||||
McGregor, Christopher J.
|
||||
nicknames f4alt
|
||||
2021 October
|
||||
Texas A&M University
|
||||
|
||||
Studwell, Alex P.
|
||||
nicknames apstudwell
|
||||
2021 October
|
||||
Texas A&M University
|
||||
|
||||
Wilson, Reid
|
||||
nicknames rwilson
|
||||
2021 October
|
||||
Texas A&M University
|
||||
|
||||
Paz, Luz
|
||||
nicknames luzpaz
|
||||
2022 February
|
||||
Open Source
|
||||
|
||||
Ferguson, Sean
|
||||
nicknames GradualSyrup
|
||||
2022 March
|
||||
Texas A&M University
|
||||
|
||||
Chambers, William R.
|
||||
nicknames redcarrera
|
||||
2022 April
|
||||
U.S. Army DEVCOM Analysis Center
|
||||
|
||||
Kejriwal, Tanya
|
||||
nicknames tanyakejriwal
|
||||
2022 February
|
||||
Texas A&M University
|
||||
|
||||
Servin, Diego
|
||||
nicknames dservin
|
||||
2022 February
|
||||
Texas A&M University
|
||||
|
||||
Norris, Cameron
|
||||
nicknames cameron-norris
|
||||
2022 February
|
||||
Texas A&M University
|
||||
|
||||
Hernandez, Luis
|
||||
nicknames LouisTheLeaf
|
||||
2022 February
|
||||
Texas A&M University
|
||||
|
||||
Curtis, Alexandria
|
||||
nicknames acurtis55
|
||||
2022 February
|
||||
Texas A&M University
|
||||
|
||||
Plaisance, Andrew T.
|
||||
nicknames atp318
|
||||
2022 February
|
||||
Texas A&M University
|
||||
|
||||
Stepic, Joseph
|
||||
nicknames JosephStepic
|
||||
2022 February
|
||||
Texas A&M University
|
||||
|
||||
Santos, Kevin
|
||||
2022 February
|
||||
Texas A&M University
|
||||
|
||||
Bergeron, Wesley Paul
|
||||
2022 February
|
||||
Texas A&M University
|
||||
|
||||
Chen, Zhuo (Danny)
|
||||
2023 February
|
||||
Texas A&M University
|
||||
|
||||
Hoskinson, Allyson
|
||||
2023 February
|
||||
Texas A&M University
|
||||
|
||||
Plant, Andrew
|
||||
2023 February
|
||||
Texas A&M University
|
||||
|
||||
Sturtevant, Mark
|
||||
2023 February
|
||||
Texas A&M University
|
||||
|
||||
Tao, Michael
|
||||
2023 February
|
||||
Texas A&M University
|
||||
|
||||
Dhawan, Rohan
|
||||
2023 October
|
||||
Texas A&M University
|
||||
|
||||
Feng, Feng
|
||||
2023 October
|
||||
Texas A&M University
|
||||
|
||||
Hollenbeck, Sam
|
||||
nicknames samhollenbeck
|
||||
2023 October
|
||||
Texas A&M University
|
||||
|
||||
Pham, Timothy
|
||||
nicknames YUMGUY
|
||||
2023 October
|
||||
Texas A&M University
|
||||
|
||||
Zou, Yida
|
||||
nicknames YidaZou
|
||||
2023 October
|
||||
Texas A&M University
|
||||
|
||||
Reynolds, Timothy
|
||||
nicknames TheZouave007
|
||||
2024 February
|
||||
Texas A&M University
|
||||
|
||||
Delbarre, Gaultier
|
||||
nicknames CoralRocker
|
||||
2024 March
|
||||
Texas A&M University
|
||||
|
||||
Beckett, Ian
|
||||
2024 March
|
||||
Texas A&M University
|
||||
|
||||
McLean, Connor
|
||||
2024 March
|
||||
Texas A&M University
|
||||
|
||||
Reel, Samuel (Sammy)
|
||||
2024 March
|
||||
Texas A&M University
|
||||
|
||||
Rupesh
|
||||
nicknames rupes, rupeshca007
|
||||
2026 March
|
||||
Open Source
|
||||
|
||||
nicknames laithaldaeef
|
||||
2026 March
|
||||
Open Source
|
||||
|
||||
|
||||
SPECIAL THANKS
|
||||
@@ -1230,7 +824,7 @@ Thomas, Balbir
|
||||
Open Source
|
||||
|
||||
Remenak, Daniel T.
|
||||
nicknames DTRemenak, Erroneous, dtremenak
|
||||
nicknames DTRemenak, Erroneous
|
||||
2005 July
|
||||
California Institute of Technology
|
||||
Open Source
|
||||
@@ -1372,59 +966,6 @@ nicknames talwindersaini
|
||||
2013 July
|
||||
Open Source
|
||||
|
||||
YuGin, Tan
|
||||
2013 November
|
||||
Open Source (GCI)
|
||||
|
||||
nicknames mandar
|
||||
2013 December
|
||||
Open Source (GCI)
|
||||
|
||||
Lotsu, Alexander
|
||||
nicknames Alex
|
||||
2013 December
|
||||
Open Source (GCI)
|
||||
|
||||
Hyams, Daniel
|
||||
nicknames dhyams
|
||||
2014 February
|
||||
Open Source
|
||||
|
||||
Reddy, Raj
|
||||
nicknames raj12lnm
|
||||
2014 May
|
||||
Open Source
|
||||
|
||||
Malhotra, Shivoam
|
||||
nicknames shiv05
|
||||
2015 March
|
||||
Open Source
|
||||
|
||||
Chepkwony, Benson
|
||||
nicknames bchepkwny
|
||||
2015 December
|
||||
Open Source
|
||||
|
||||
Sagarwal
|
||||
2017 January
|
||||
Open Source (GCI)
|
||||
|
||||
Liu, Jeffrey
|
||||
2019 December
|
||||
Open Source (GCI)
|
||||
|
||||
Wade, Pauline
|
||||
2021 August
|
||||
Texas A&M University
|
||||
|
||||
nicknames r-ricci
|
||||
2022 January
|
||||
Open Source
|
||||
|
||||
nicknames Meghna45-code
|
||||
2026 July
|
||||
Open Source
|
||||
|
||||
|
||||
CORPORATE AND ORGANIZATION SUPPORT
|
||||
----------------------------------
|
||||
@@ -1496,6 +1037,10 @@ contributed entirely before the name change reflect the original name,
|
||||
whereas persons who continued or began contributions after the name
|
||||
change reflect the new name.
|
||||
|
||||
If corrections or additions need to be made, please contact one of the
|
||||
developers. Additionally, you may send inquiries, suggestions, and
|
||||
comments to the developer list: brlcad-devel@lists.sourceforge.net
|
||||
** The individual is an active contributor, participating in BRL-CAD
|
||||
development within the past 12 months with numerous contributions.
|
||||
|
||||
If any corrections or additions need to be made, please contact one of
|
||||
the active core developers. Additionally, you may send inquiries,
|
||||
suggestions, and comments to the developer mailing list:
|
||||
brlcad-devel@lists.sourceforge.net
|
||||
|
||||
@@ -15,190 +15,10 @@ on-going issues.
|
||||
Recent Bugs
|
||||
-----------
|
||||
|
||||
* fbserv as well as -F option handling (e.g., -F0 or -F/dev/wgls) that
|
||||
is supported across myriad other tools appears to be broken on
|
||||
Windows in a git bash shell (problem is not seen in Command Prompt.)
|
||||
Something is concatenating EXEPATH and/or fbserv silently fails with
|
||||
return codes (e.g., when not specifying -F, only giving the port.)
|
||||
|
||||
* recursive bu_parallel() failure, tbd whether cpp11 or pthread impl,
|
||||
likely because IDs are exceeding MAX_PSW, causing mayhem and chaos.
|
||||
|
||||
* rtcheck_handler_cleanup() throws 'invalid handle specified' on Windows
|
||||
in closing of STDOUT (see FIXME comment). Does not affect normal running,
|
||||
but a debug build complains.
|
||||
|
||||
* very peculiar non-linear memory issue in rt when allocating a large
|
||||
flat hierarchy of objects. I have three combs, each with 10k
|
||||
members unioned. Each member is an rcc. Rendering with just one
|
||||
comb results in about 2GB usage. Two combs result in about 3.5GB
|
||||
usage. Three combs results in 18GB usage. Four is killed after
|
||||
24GB. Suspect there is some 32-bit issue once we exceed 4GB that is
|
||||
causing subsequent allocations to be bigger than necessary. Looking
|
||||
at allocation stack, rt_ct_get() appears to be allocating 10MB
|
||||
chunks.
|
||||
|
||||
[HARD] Superlinear growth (3 combs -> 18GB) points at an
|
||||
integer/overflow interaction deep in the space-partitioning cut
|
||||
allocator (rt_ct_get 10MB chunks), intertwined with bu memory.
|
||||
Painful to isolate and validate at scale.
|
||||
[FAN-OUT: poor -- one focused investigator with an allocator/profiler
|
||||
trace; not parallelizable.]
|
||||
|
||||
* rt from mged is not outputting overlap log messages or rt summary.
|
||||
Stops printing after opendb line. (Observed on Mac)
|
||||
|
||||
* mged running an rt with excessive overlaps ends up in a deadlock.
|
||||
Backtrace indicates write buffer is full, likely because no output
|
||||
is going to terminal. (Observed on Mac)
|
||||
|
||||
* Running"mged -c test.g" exits automatically on default prompt:
|
||||
...
|
||||
Create new database (y|n)[n]?
|
||||
Warning: no database is currently open!
|
||||
morrison@Miniagua .build %
|
||||
|
||||
* MGED crashes trying to open the repository file
|
||||
doc/docbook/resources/other/standard/xsl/images/important.tif
|
||||
It is mis-identified as a v4 .g file due to the file header's
|
||||
first character matching the v4 .g first character.
|
||||
|
||||
* MGED on Mac hides the main command window on File->Open when you
|
||||
cancel the open. Presumably the withdraw is somehow getting routed
|
||||
to the window and not just the open dialog.
|
||||
|
||||
* running pkgIndex and/or mkIndex during build appears to be randomly
|
||||
crashing on Mac using bundled libs
|
||||
|
||||
* Visual error when drawing using -S -m1 of a region with the same solid
|
||||
subtracted and then unioned.
|
||||
|
||||
make two boxes stacked on top of one another
|
||||
> r boxes.r u box - box1 u box1
|
||||
> e -S -m1 boxes.r
|
||||
box1 is not drawn
|
||||
|
||||
* raytracing a revolved sketch seems to work fine, but rtarea and gqa
|
||||
seem to be crashing on that same revolve. curiously, the brep
|
||||
revolve from the csgbrep proc-db has the same failure as well as the
|
||||
brep ehy.
|
||||
|
||||
* ogl display manager still crashes on attach in mged on Mac OS X 10.5
|
||||
|
||||
* running archer "" at least on windows results in a file type dialog
|
||||
and errors with "can't read "_conv_log": no such variable
|
||||
|
||||
* in mged, running the 'attach' command (confirmed issues with X and
|
||||
ogl), closing the window, and then issuing a 'draw' results in mged
|
||||
crashing.
|
||||
|
||||
* killtree / crashes
|
||||
|
||||
* object names with a / or \ in them make ls or underlying directory
|
||||
parsing logic display them incorrectly.
|
||||
|
||||
* search -exec results are inconsistent with search filtered
|
||||
results. for example, "search . -attr ..." returns A B C, but
|
||||
"search . -attr ... -exec attr show {} \;" results in attr show
|
||||
output for A B C as well as subtracted repetitions. For example,
|
||||
say A contains - B - C, then it will show output for A B C B C.
|
||||
|
||||
adding -bool u gets closer to consistent but still appears to repeat
|
||||
the last object
|
||||
|
||||
* fbclear -c appears to hang indefinitely inside pkg_bwaitfor,
|
||||
possible protocol mismatch or capability removed/changed in fbserv.
|
||||
|
||||
* apparently all four BRL-CAD Tutorial Series volumes are missing from
|
||||
our bibliography...
|
||||
|
||||
* mater -d information stored in the .g file doesn't survive a
|
||||
garbage collection operation.
|
||||
|
||||
|
||||
* fix checker.sh script and/or overlap GUI so that the latter will
|
||||
read the resulting overlap pairings file from the prior.
|
||||
alternatively, need to be able to run overlap check on server
|
||||
without GUI, so could implement an overlaps file output option to be
|
||||
run via mged -c.
|
||||
|
||||
* running 'put' on geometry that is already displayed results in a NaN
|
||||
view (at least View and Eye_pos parameters are non) despite geometry
|
||||
still being displayed. this causes 'rt' to fly into an infinite
|
||||
loop, presumably trying to increment rays from the eye position.
|
||||
|
||||
* creating an object with a slashes in the name (e.g., cp foo foo/R)
|
||||
results in an object that cannot be deleted/renamed. bad behavior
|
||||
presumably extends to any name with path separators.
|
||||
|
||||
* If we draw any form, then trace it using rt, then change of database
|
||||
(by clicking file>open and selecting another database), badness
|
||||
ensues. One report has quitting the rt window causing a segfault.
|
||||
Another (confirmed) hung mged (stuck/inf loop).
|
||||
|
||||
* annotation bugs:
|
||||
in sph1.s sph 0 0 0 10
|
||||
in ann1.s annot 0 0 0 test1 10 10 3 1
|
||||
in ann2.s annot 30 30 30 test2 40 40 3 1
|
||||
# ann2.s's label looks wrong, points at origin?
|
||||
in ann3.s annot 0 0 0 1 10 10 3 1
|
||||
# using numbers for a label results in no label
|
||||
|
||||
* rtedge with perspective is wrong. it fills in nearly entire faces,
|
||||
vertically in particular. it's worse on small sized renders, and
|
||||
gets better the larger the render size (indicating there's some
|
||||
neighbor distance coming into play that is not affected by
|
||||
max_dist). eoes not happen in non-perspective ray-traces.
|
||||
|
||||
* get_regions tcl command doesn't respond well to situations where
|
||||
child object names in combs have dashes (the "-" character) in
|
||||
names. It tries to interpret the dash as an argument delimiter.
|
||||
Looks like this may be only in situations where the "-" is the
|
||||
lead character and on Windows? Been hard to reproduce...
|
||||
|
||||
* dsp does not facetize correctly with zero elevation areas in the
|
||||
data - need robustness improvements
|
||||
|
||||
* dsp primitives specifying data using Windows style file paths
|
||||
don't work.
|
||||
|
||||
* attempting to create a dsp using a binary object caused a crash on
|
||||
Linux - need to figure out if this was caused by feeding it the wrong
|
||||
kind of binary object or some other error...
|
||||
|
||||
* screengrab on windows does not work
|
||||
|
||||
* Recursive submodel predictably goes infinite, need stack-based
|
||||
db_walk_tree(): mged> in submodel submodel submodel grid test.g
|
||||
|
||||
* ogl display manager and framebuffer are creating windows with
|
||||
transparent backgrounds (the glClear color is not being drawn) on
|
||||
Linux. Presumably a driver-related issue, alpha channel, or expose
|
||||
event issue. Inspecting further, it may be related to environments
|
||||
where shmget() fails (or is requested via /dev/oglp) and we get
|
||||
private memory -- looks like private memory is not initialized
|
||||
(observed on Mac 10.6, Windows, and Ubuntu Linux using 7.26).
|
||||
|
||||
* fblabel seems quite busted, at least talking to a /dev/X fbserv, in
|
||||
that it only draws the first character and eventually displays
|
||||
rem_read() failures when run in -d debug mode.
|
||||
|
||||
* rtedge doesn't refresh a /dev/X fbserv (presumably double-buffered)
|
||||
after doing an overlay render. it does draw, though, as confirmed
|
||||
by a forced fb-fb refresh.
|
||||
|
||||
* typing 'comb -f -r assembly_name' shuts down mged with the error:
|
||||
ERROR: bad pointer 0000000000B4CA50: s/b bu_external(x768dbbd0), was bu_vls(x89333bbb), file ..\..\..\brlcad_src\src\libbu\parse.c, line 2443"
|
||||
And on the mged command line:
|
||||
rt_db_cvt_to_external5 expecting non-NULL name parameter
|
||||
wdb_export((null)): solid export failure
|
||||
|
||||
* report of mged command history not working with the down arrow key
|
||||
in 7.25.0 (on Windows, unknown on other platforms). Up arrow works
|
||||
fine.
|
||||
|
||||
* wgl framebuffer is not lingering on windows (regardless of using
|
||||
wgll or default) when it should
|
||||
* calling "attr set obj key value" should always result in key getting
|
||||
set to value, no matter what, as it is the lowest-level attribute
|
||||
management interface and what the command (correctly) documents.
|
||||
example demonstrated to not work was: attr set obj rgb 123/123/123
|
||||
|
||||
* report of LIBBU not working when accessed by a multithreaded
|
||||
application on Windows. reportedly due to some problem with the
|
||||
@@ -207,6 +27,14 @@ Recent Bugs
|
||||
* report of g-iges crashing (on Windows) when exporting a 1.2MB BoT
|
||||
mesh (presumably imported via stl-g). worked for smaller models.
|
||||
|
||||
* ogl display manager and framebuffer are creating windows with
|
||||
transparent backgrounds (the glClear color is not being drawn) on
|
||||
Linux. Presumably a driver-related issue, alpha channel, or expose
|
||||
event issue. Inspecting further, it may be related to environments
|
||||
where shmget() fails (or is requested via /dev/oglp) and we get
|
||||
private memory -- looks like private memory is not initialized
|
||||
(observed on Mac 10.6).
|
||||
|
||||
* autoview [scale] isn't updating the wireframe when opening a
|
||||
database, drawing geometry, then running autoview. the status bar
|
||||
shows the scale change, but the graphics window remains unaffected
|
||||
@@ -237,16 +65,31 @@ Recent Bugs
|
||||
|
||||
rm -f terra.pix && valgrind bin/rt -o terra.pix -P1 -H3 -s1024 share/brlcad/7.21.0/db/terra.g all.g
|
||||
|
||||
[HARD] valgrind-confirmed 8-byte corruption after a build_spec_table()
|
||||
realloc in find_spec_wgt(), where "bookkeeping seems okay" -- i.e.,
|
||||
root cause is non-obvious. Classic hard-to-pin data race.
|
||||
[FAN-OUT: poor -- a single heisenbug needing one careful
|
||||
investigator, not parallel coverage.]
|
||||
|
||||
* mged 'joint' hold command isn't working. looks like the fp_names
|
||||
book-keeping is fuxored or the db_lookup is returning NULL (or isn't
|
||||
yet performed).
|
||||
|
||||
* idents command is reporting a bogus region count in the region
|
||||
output table listing (first column).
|
||||
|
||||
* yacc 1.9 will not output a header if a path is given to the -o
|
||||
option. yacc should be run from the binary directory instead of the
|
||||
source directory so that the command may be simply yacc -d -o
|
||||
points_parse.c ${CMAKE_SOURCE_DIRECTORY}/points_parse.y
|
||||
|
||||
* src/librt/primitives/bot/g_bot_include.c:rt_bot_bbox() routine isn't
|
||||
calculating the bbox correctly
|
||||
|
||||
* 'exists' command documentation claims more than has been implemented
|
||||
|
||||
* rtxray crashes if you specify a -o *.bw output file due to
|
||||
assumptions in the rt front-end that all output files are .pix
|
||||
|
||||
* raytracing a revolved sketch seems to work fine, but rtarea and gqa
|
||||
seem to be crashing on that same revolve. curiously, the brep
|
||||
revolve from the csgbrep proc-db has the same failure as well as the
|
||||
brep ehy.
|
||||
|
||||
* encountered a crash during rtarea on a (default) facetized version
|
||||
of the hyp from the proc-db csgbrep tool.
|
||||
|
||||
@@ -261,8 +104,14 @@ Recent Bugs
|
||||
* torus with a near zero inner diameter results in zero-length edges
|
||||
during tessellation.
|
||||
|
||||
* report that "keep" sometimes results in a .g file with unknown units;
|
||||
dbconcat also is reported to set the units to unknown if concatting
|
||||
* opening a database in archer with the same name as a command doesn't
|
||||
work.
|
||||
|
||||
* bu_log() with a width specifier does not align like printf().
|
||||
Example: bu_log("%24s", str);
|
||||
|
||||
* report that keep sometimes results in a .g file with unknown units
|
||||
dbconcat also is reported to set the units to unknown if concating
|
||||
a file with unknown units.
|
||||
|
||||
* infinite loop in rt_find_backing_dist() raytracing a BoT (without
|
||||
@@ -288,6 +137,10 @@ Recent Bugs
|
||||
|
||||
* rt -i -s4096 -H16 -F/dev/null boolean-ops.g all
|
||||
|
||||
* asc2g of a .asc file containing the first line as a "#" comment
|
||||
results in a bu_malloc(0) bomb. comment lines should be valid in
|
||||
.asc files.
|
||||
|
||||
* compilation reportedly fails when building Tcl if the path to the
|
||||
source directory includes a space.
|
||||
|
||||
@@ -316,9 +169,13 @@ Recent Bugs
|
||||
* edcomb command seems to be busted similar to red, doesn't seem to do
|
||||
anything.
|
||||
|
||||
* gqa manpage has the wrong indentation on the options write-up.
|
||||
|
||||
* Detailed BoT model ray trace image had incorrect background pixel
|
||||
values in framebuffer, off slightly by one.
|
||||
|
||||
* ogl display manager still crashes on attach in mged on Mac OS X 10.5
|
||||
|
||||
* rt is consuming 100% CPU in fb_close() on a lingering ogl
|
||||
framebuffer waiting to close. needs to sleep or select for a while.
|
||||
|
||||
@@ -330,8 +187,15 @@ Recent Bugs
|
||||
sub-1sec fps, Z/B after rotating wireframe but before update
|
||||
finishes drawing.
|
||||
|
||||
* rtedge help shows redirection to a file working, but it does not
|
||||
seem to work (zero-file results).
|
||||
|
||||
* report of rt aborting randomly on 64-bit with camo shader.
|
||||
|
||||
* mged raytrace fails with simple "raytrace failed" message when using
|
||||
rt, nirt, etc. on Windows after modifying a region. See sf bug
|
||||
report 2954404.
|
||||
|
||||
* mged rrt command is not respecting the view size, just does
|
||||
something similar to autoview but even gets az/el wrong too.
|
||||
|
||||
@@ -341,14 +205,17 @@ Recent Bugs
|
||||
tclscripts/mged/tclIndex for examples:
|
||||
https://sourceforge.net/tracker/?func=detail&atid=640802&aid=2923199&group_id=105292
|
||||
|
||||
* hyp tessellation routine creates bot that does not raytrace
|
||||
* vdeck truncates the region names in the 'regions' file, probably
|
||||
wrong bu_strlcpy() length.
|
||||
|
||||
* hyp used in a boolean with other objects (even unions) does not
|
||||
raytrace
|
||||
* hyp tessellation routine creates bot that does not raytrace
|
||||
|
||||
* if you attach a display manager in tk-mged, kill the window, then
|
||||
quit, mged crashes on exit.
|
||||
|
||||
* CMD-b and CMD-f navigates the mged command window text widget on Mac
|
||||
and trivially causes problems with the cursor and text injection.
|
||||
|
||||
* mged segfaults when drawing lots of solids at once (e.g. draw *.s)
|
||||
|
||||
* mged command mode doesn't display the output of multiple
|
||||
@@ -384,6 +251,11 @@ Recent Bugs
|
||||
display manager window. mged classic mode, where there is no
|
||||
parent window, exhibits the bad rotate behavior immediately.
|
||||
|
||||
* rtedge fills in nearly entire faces of an object when executing on a
|
||||
model that is in perspective mode. Effects really bad on small sized
|
||||
renders, and gets better the larger the render size. Does not happen
|
||||
in non-perspective ray-traces.
|
||||
|
||||
* infinite light sources close to objects result in unexpected/bad
|
||||
light behavior. example is a 1m sph light about 5m from a box about
|
||||
1k x 1k x 1k in size. setting make each light be red, green, and
|
||||
@@ -397,6 +269,9 @@ Recent Bugs
|
||||
bogus lists visible with nirt in mged, entirely missing the bot, or
|
||||
mismatched entry/exit/overlap segments.
|
||||
|
||||
* nirt -e "xyz val val val" doesn't work due to the space after the -e
|
||||
and how the nirt/rt commands parse quoted args.
|
||||
|
||||
* tab completion in classic/command mode sometimes doesn't work
|
||||
(presumably if mged can't find tcl resources). was finally able to
|
||||
reproduce this with the result given as:
|
||||
@@ -412,6 +287,11 @@ Recent Bugs
|
||||
* running 'keep' on too many objects (hundreds is causing a usage
|
||||
statement (and not doing the keep)
|
||||
|
||||
* rtwizard won't display a line overlay if you line object is obscured
|
||||
by another. Example being to display a vehicle as ghost, crew as
|
||||
solid, and crew as line. confirmed even when using the other line
|
||||
occlusion settings.
|
||||
|
||||
* fbserv is receiving image data very slowly if the framebuffer is a
|
||||
remote X24 interface. could reproduce on mac with the following:
|
||||
|
||||
@@ -423,10 +303,9 @@ Recent Bugs
|
||||
|
||||
* File->Export seems to not work on Windows
|
||||
|
||||
* xpush fails to properly create a hierarchy killing existing objects
|
||||
resulting in dangling references. This may have been fixed by
|
||||
r69256, but a model that exposes the issue has to be tested to be
|
||||
sure.
|
||||
* xpush fails to properly create a hierarchy leaving some as top-level
|
||||
objects and killing other existing objects resulting in dangling
|
||||
references.
|
||||
|
||||
* mged on Mac OS X will crash on an X11 call if compiled against
|
||||
system Tcl/Tk (at least on 10.4 linking against 8.4), see TODO
|
||||
@@ -471,6 +350,9 @@ Recent Bugs
|
||||
ubuntu linux. key events go to the command window even with the
|
||||
graphics window has focus.
|
||||
|
||||
* MGED File->Preferences->Fonts results in error "named font "button
|
||||
_font" doesn't exist on Linux.
|
||||
|
||||
* mged tab-completion doesn't work if the object names have spaces
|
||||
|
||||
* Open dialog in MGED seems rather busted for scrolling and selection
|
||||
@@ -500,6 +382,8 @@ Recent Bugs
|
||||
* overlap tool in mged encourages very inefficient CSG operations
|
||||
(e.g. a simple bolt with an entire hull armor subtracted)
|
||||
|
||||
* a character is (still) sometimes captured by the cursor box
|
||||
|
||||
* permute (in mged) requires apply or save before 'new' vertex values
|
||||
will function properly as keypoints.
|
||||
|
||||
@@ -508,6 +392,16 @@ Recent Bugs
|
||||
* dsp primitive is going into what seems to be an unbounded memory
|
||||
allocation loop during prep, inside dsp_layers().
|
||||
|
||||
* crashes during photonmap raytrace of m35 where right node is invalid
|
||||
rt -o test.pix -V 1.0 -P4 -J0 -l7 -A0 ~/Desktop/m35.g all.g box.r sph.r
|
||||
|
||||
* libfb cannot utilize standard output/error "device" files without
|
||||
path trickery. it recognizes the /dev/ prefix and presumes it's a
|
||||
libfb device instead of a filesystem device.
|
||||
|
||||
OK: rt -F/./dev/stdout
|
||||
BAD: rt -F/dev/stdout
|
||||
|
||||
* libfb cannot open a file descriptor when piping/redirecting output.
|
||||
|
||||
OK: rt -F/./dev/stdout moss.g all.g
|
||||
@@ -530,6 +424,15 @@ Recent Bugs
|
||||
* triangulation of some pipe in toyjeep.g fails (rather reliably) on
|
||||
some given bend. fails in nmg_triangulate model().
|
||||
|
||||
* tgc reports one hit errors though hit point has 0,0,0 direction
|
||||
implying that maybe the point was supposedly deleted.
|
||||
|
||||
* rtedge is not respecting the -c"set" options. needs to give some
|
||||
indication that they were parsed too since it ignores unrecognized
|
||||
values apparently.
|
||||
|
||||
* fbhelp sends some of the output to stdout and some to stderr...
|
||||
|
||||
* debugbu 2 immediately reports a bu_vls_free() error.. apparently
|
||||
been a problem since 4.5 days. this occurs because
|
||||
bu_memdebug_add() is not called unless memory checking is enabled
|
||||
@@ -546,6 +449,11 @@ Recent Bugs
|
||||
|
||||
* Create menu.. create "part" boo hiss..
|
||||
|
||||
* wavelet isn't working correctly on a simple image decomposition &
|
||||
reconstruction.
|
||||
|
||||
* query_ray can't find nirt if not installed
|
||||
|
||||
* fbed is looking for /usr/lib/vfont/nonie.r.12
|
||||
|
||||
* mged doesn't check if html_dir does not exist when searching for
|
||||
@@ -565,6 +473,11 @@ Recent Bugs
|
||||
|
||||
* concave arbs give correct wireframe but do not raytrace correctly.
|
||||
|
||||
* rtwizard/rtedge creates incorrect "fuzzy" edge overlay when creating
|
||||
a "Ghost Image with Insert and Lines" that includes a light source
|
||||
and object close to surface (e.g. moss.g; select plane, light, and
|
||||
cone for ghost; select cone for insert and lines.)
|
||||
|
||||
* mged's solid illuminate doesn't work when Lighting is turned on
|
||||
|
||||
* raytrace of zoomed images (e.g., -s64) doesn't work for if_X24
|
||||
@@ -590,12 +503,16 @@ Recent Bugs
|
||||
* mged primitive editor doesn't accept/apply values to disk for
|
||||
certain primitives (e.g. sph)
|
||||
|
||||
* photon map cache file doesn't work (seems to crash rt on use)
|
||||
|
||||
* enabling perspective mode horks shaded mode, also Z clipping
|
||||
shouldn't be required to get the shading.
|
||||
|
||||
* an underlay framebuffer does not underlay with shaded mode
|
||||
|
||||
* rtarea gives incorrect areas when using -H hypersample flag
|
||||
* rtweight chokes on a .density file that has less than 3 values per
|
||||
line (infinite loop). also gives infinite areas when presented with
|
||||
an empty .density file.
|
||||
|
||||
* setting src/librt/db5_io.c's AVS_ADD off in db5_import_attributes
|
||||
causes bad things to happen and it really shouldn't.
|
||||
@@ -606,9 +523,35 @@ Recent Bugs
|
||||
* sketches extruded with non-square AB vectors results in inner sketch
|
||||
components not getting scaled properly.
|
||||
|
||||
* rtcheck is ignoring fastgen tagged geometry since no multioverlap
|
||||
handler is set.
|
||||
|
||||
* bot-bldxf fails in db_walk_tree(), interface may have changed
|
||||
|
||||
|
||||
Older Bugs
|
||||
----------
|
||||
|
||||
* several manpages are missing or out of date for various tools
|
||||
|
||||
* X11 framebuffer often fails to display on certain middle bit depth
|
||||
displays. (e.g. 15 or 16 bit depth)
|
||||
|
||||
* mk_lcomb fails on large combinations due to mk_tree_pure() building
|
||||
a left-heavy tree and wdb_put_internal() then recursively performing
|
||||
lookup and put calls.
|
||||
|
||||
|
||||
Annoyances
|
||||
----------
|
||||
|
||||
* matrix edits on objects in mged require you to select a primitive
|
||||
for a coordinate system reference. this can be counterintuitive and
|
||||
confusing.
|
||||
|
||||
* there are frequently modality errors when entering edit mode as
|
||||
control and middle mouse rebind to model edit instead of view edit.
|
||||
|
||||
---
|
||||
Bugs should be reported to the bug tracker on the project website at
|
||||
http://sourceforge.net/tracker/?atid=640802&group_id=105292
|
||||
|
||||
@@ -0,0 +1,952 @@
|
||||
-*- coding: utf-8 -*-
|
||||
BRL-CAD Interface Change Policy
|
||||
===============================
|
||||
|
||||
Included below are details of BRL-CAD public interface changes that
|
||||
potentially impact external developers and users. Public interfaces
|
||||
include developer application programming interface (API) calls as
|
||||
well as user application command-line interface (CLI) and graphical
|
||||
user interface (GUI) behaviors. Changes are characterized as:
|
||||
|
||||
1) changing a new interface,
|
||||
2) being minimally impacting, or
|
||||
3) requiring adherence to deprecation policy.
|
||||
|
||||
This policy is intentionally designed to balance developer agility,
|
||||
helping accelerate development, with interface stability, helping
|
||||
preserve application developer and user investments.
|
||||
|
||||
All changes to BRL-CAD are expected to conform to this change policy.
|
||||
|
||||
|
||||
NEW INTERFACE
|
||||
-------------
|
||||
|
||||
Changes to interfaces that have been recently introduced are often
|
||||
subject to change and should not yet be relied upon by application
|
||||
developers or users. They may be changed as needed from release to
|
||||
release and are not subject to change policy restrictions until they
|
||||
have been included in at least TWO releases without change.
|
||||
|
||||
|
||||
MINIMALLY IMPACTING
|
||||
-------------------
|
||||
|
||||
If a change to an interface has a suitable and completely equivalent
|
||||
alternative, the change is deemed to be "minimally impacting" and can
|
||||
be made during any release. Examples of such changes include renaming
|
||||
an interface, reordering parameters, adding additional parameters for
|
||||
previously implicit behavior, and removing unused parameters.
|
||||
|
||||
Basically, the impact can usually be considered minimally impacting if
|
||||
a static regular expression search-and-replace is all that is needed
|
||||
to update calling code, and no change is imposed on the user.
|
||||
|
||||
|
||||
DEPRECATION POLICY
|
||||
------------------
|
||||
|
||||
If a change will intentionally change, replace, or remove
|
||||
functionality that has been documented and published in at least TWO
|
||||
releases should be first marked as DEPRECATED. Otherwise, changes to
|
||||
interfaces that have not been publicly announced or are not publicly
|
||||
documented for at least two releases may be changed without notice.
|
||||
|
||||
The general practice is that public interface changes may go from
|
||||
deprecated to obsolete, whereby previous behavior is removed or
|
||||
changed, during one of the following events:
|
||||
|
||||
a) during a major release (e.g. going from 7.*.* to 8.*.*)
|
||||
|
||||
b) during a minor release provided the change was publicly announced
|
||||
as deprecated beforehand AND sufficient deprecation warning was
|
||||
given via i) TWO minor releases included the deprecation notice,
|
||||
and ii) at least THREE months (90 days) have passed since the
|
||||
deprecation was announced
|
||||
|
||||
c) during any release provided there still exists an EQUIVALENT
|
||||
alternative interface that does not impose an undue burden on users
|
||||
or developers (see "MINIMALLY IMPACTING")
|
||||
|
||||
Public interfaces scheduled for removal should be visibly marked as
|
||||
deprecated during compilation with the DEPRECATED keyword on function
|
||||
declarations, with #warning "DEPRECATED ..." pre-processor statements,
|
||||
and with @DEPRECATED in source code comments. Where users are not
|
||||
adversely affected, a run-time DEPRECATION statement may be printed.
|
||||
|
||||
Whenever published functionality is finally removed, move its entry
|
||||
from the DEPRECATED section below to the OBSOLETE section for the
|
||||
version in which it was removed. Make sure the entry retains a
|
||||
reference to the version in which the item was marked as deprecated.
|
||||
|
||||
|
||||
EXAMPLES
|
||||
--------
|
||||
|
||||
Example #1: Say we decided during 7.50.3 development to remove
|
||||
rt_shootray() from the API without a replacement. That does NOT
|
||||
qualify as "minimally impacting" because there's no replacement and
|
||||
rt_shootray() has been published and documented in more than two
|
||||
releases. We'd annotate the deprecation in the CHANGES file, mark the
|
||||
function as DEPRECATED in the API header, and post the 7.50.4 release.
|
||||
The soonest that function could be removed would be in the 7.54.0
|
||||
release during 7.53 development. It could NOT be removed in 7.54.2
|
||||
since it's a patch version, prior to the 7.54 release line, nor even
|
||||
during 7.54.0 if less than 90 days had passed since 7.50.6 was posted.
|
||||
|
||||
Example #2: Say we decide during 7.48.0 development to modify bu_log()
|
||||
by adding a new additional enum parameter denoting a message type.
|
||||
This change is considered minimally impacting because it can be
|
||||
characterized by a simple regular expression (e.g.,
|
||||
s/bu_log(/bu_log(PRINT, /g). Updates to calling codes are considered
|
||||
trivial. The change would get documented in the CHANGES file and all
|
||||
calls that can be updated must be updated at that time.
|
||||
|
||||
|
||||
**************
|
||||
* DEPRECATED *
|
||||
**************
|
||||
|
||||
The items listed below are interfaces that are deprecated. They are
|
||||
categorized by the release in which the change was made. If the
|
||||
change involved a removal of a command or function, both the original
|
||||
and new names should be listed for reference.
|
||||
|
||||
|
||||
7.24
|
||||
----
|
||||
include/raytrace librt
|
||||
db_full_path_list_add(), db_free_full_path_list() [deprecated 7.24]
|
||||
db_search_formplan(), db_search_freeplan(), db_search_full_paths() [deprecated 7.24]
|
||||
db_search_unique_objects(), struct db_full_path_list [deprecated 7.24]
|
||||
src/irprep
|
||||
all_sf, firpass, ir-X, irdisp, pictx, secpass, shapefact, showterm [deprecated 7.24]
|
||||
include/raytrace.h librt
|
||||
RT_DBHASH and RT_DBNHASH [deprecation 7.24]
|
||||
|
||||
7.22
|
||||
----
|
||||
include/raytrace.h librt
|
||||
nmg_model_break_e_on_v -> nmg_break_e_on_v [deprecation 7.22]
|
||||
RT_GET_TREE -> BU_GET [deprecation 7.22]
|
||||
RT_FREE_TREE -> BU_PUT [deprecation 7.22]
|
||||
include/bu.h
|
||||
bu_parse_mm() [deprecated 7.22]
|
||||
librtserver
|
||||
becoming stand-alone project, removes optional java dependency [deprecated 7.22]
|
||||
mged
|
||||
em, e_muves, l_muves, lm, read_muves, and t_muves MUVES-specific commands [deprecated 7.22]
|
||||
|
||||
7.20
|
||||
----
|
||||
liborle
|
||||
remove liborle and the tools using it, fb-orle, orle-fb, orle-pix and
|
||||
pix-orle [deprecated 7.20]
|
||||
tclscripts/lib
|
||||
Mged, Database, Db, Dm, Drawable, Display, QuadDisplay, View -> Ged [deprecated 7.20]
|
||||
librt
|
||||
bspline primitive [deprecated 7.20]
|
||||
poly primitive [deprecated 7.20]
|
||||
hf primitive [deprecated 7.20]
|
||||
include/bu.h
|
||||
bu_vls_init_if_uninit() -> bu_vls_init() [deprecated 7.20]
|
||||
autogen.sh && configure
|
||||
GNU Autotools build system -> CMake build system [deprecated 7.20]
|
||||
./configure -> cmake . [deprecated 7.20]
|
||||
include/raytrace.h
|
||||
rt_load_attrs() -> rt_gettrees_and_attrs() or db5_import_attributs() [deprecated 7.20]
|
||||
db_regexp_match() -> !bu_fnmatch() [deprecated 7.20]
|
||||
|
||||
7.18
|
||||
----
|
||||
include/raytrace.h rt_comb_internal members
|
||||
region_id -> region_id attribute [deprecated 7.18]
|
||||
aircode -> air attribute [deprecated 7.18]
|
||||
GIFTmater -> material_id attribute [deprecated 7.18]
|
||||
los -> los attribute [deprecated 7.18]
|
||||
bu.h xdr API
|
||||
BU_GLONGLONG() -> ntohll() [deprecated 7.18]
|
||||
BU_GLONG() -> ntohl() [deprecated 7.18]
|
||||
BU_GSHORT() -> ntohs() [deprecated 7.18]
|
||||
bu_gshort() -> ntohs() [deprecated 7.18]
|
||||
bu_glong() -> ntohl() [deprecated 7.18]
|
||||
bu_pshort() -> htons() [deprecated 7.18]
|
||||
bu_plong() -> htonl() [deprecated 7.18]
|
||||
bu_plonglong() -> htonll() [deprecated 7.18]
|
||||
db.h
|
||||
rt_fastf_float() -> ntohf() [deprecated 7.18]
|
||||
rt_mat_dbmat() -> htonf() [deprecated 7.18]
|
||||
rt_dbmat_mat() -> ntohf() [deprecated 7.18]
|
||||
dbcp
|
||||
dbcp -> dd [deprecated 7.18]
|
||||
mged
|
||||
?(*) -> ? -(*) [deprecated 7.18]
|
||||
apropos(*) -> apropos -(*) [deprecated 7.18]
|
||||
dbconcat -> db concat [deprecated 7.18]
|
||||
dbupgrade -> db upgrade [deprecated 7.18]
|
||||
dbversion -> db version [deprecated 7.18]
|
||||
dbfind -> search [deprecated 7.18]
|
||||
debug* -> debug [deprecated 7.18]
|
||||
comb_std -> comb [deprecated 7.18]
|
||||
comb_color -> comb [deprecated 7.18]
|
||||
combmem -> comb [deprecated 7.18]
|
||||
kill(*) -> kill [deprecated 7.18]
|
||||
rotobj -> rot [deprecated 7.18]
|
||||
qvrot -> rot -q -v [deprecated 7.18]
|
||||
qorot -> rot -q [deprecated 7.18]
|
||||
([amov])rot -> rot -([amv]) [deprecated 7.18]
|
||||
([op])scale -> sca -(p) [deprecated 7.18]
|
||||
([op])translate -> tra -(p) [deprecated 7.18]
|
||||
nmg_(*) -> nmg (*) [deprecated 7.18]
|
||||
bot_(*) -> bot (*) [deprecated 7.18]
|
||||
[so]ed -> edit [deprecated 7.18]
|
||||
[tr]ed -> edit -t [deprecated 7.18]
|
||||
ls -oA -> ls -O [deprecated 7.18]
|
||||
draw -oA -> draw -O [deprecated 7.18]
|
||||
erase -oA -> erase -O [deprecated 7.18]
|
||||
erase_all -> erase -r [deprecated 7.18]
|
||||
move_all -> move -r [deprecated 7.18]
|
||||
query_ray -> nirt [deprecated 7.18]
|
||||
vdraw -> draw -v [deprecated 7.18]
|
||||
vnirt -> nirt -v [deprecated 7.18]
|
||||
vquery_ray -> nirt -v [deprecated 7.18]
|
||||
xpush -> push -x [deprecated 7.18]
|
||||
|
||||
7.16
|
||||
----
|
||||
struct bu_structparse 'i' format
|
||||
'i' -> '%p' [deprecated 7.16]
|
||||
SGI-specific tools
|
||||
pl-sgi -> pl-fb [ deprecated 7.16 ]
|
||||
Dunn camera and Canon printer tools
|
||||
dunncolor [ deprecated 7.16 ]
|
||||
dunnsnap [ deprecated 7.16 ]
|
||||
canonize [ deprecated 7.16 ]
|
||||
reserved attributes and case-sensitivity
|
||||
id -> region_id [deprecated 7.16]
|
||||
GIFTmater -> material_id [deprecated 7.16]
|
||||
GIFT_MATERIAL -> material_id [deprecated 7.16]
|
||||
mat -> material_id [deprecated 7.16]
|
||||
AIRCODE -> air [deprecated 7.16]
|
||||
rgb -> color [deprecated 7.16]
|
||||
oshader -> shader [deprecated 7.16]
|
||||
genptr_t/GENPTR_NULL
|
||||
genptr_t -> void* [deprecated 7.16]
|
||||
any-png.sh
|
||||
use pix tools [deprecated 7.16]
|
||||
cadbug.sh
|
||||
use sf.net tracker [deprecated 7.16]
|
||||
cray.sh
|
||||
obsolete hardware [deprecated 7.16]
|
||||
pixwrite.sh
|
||||
obsolete hardware [deprecated 7.16]
|
||||
pixread.sh
|
||||
obsolete hardware [deprecated 7.16]
|
||||
sgisnap.sh
|
||||
obsolete hardware [deprecated 7.16]
|
||||
include/bu.h
|
||||
bu_argv0() -> bu_basename(bu_argv0_full_path()); [deprecated 7.16]
|
||||
include/raytrace.h
|
||||
rt_prep_timer() -> bu_timer() [deprecated 7.16]
|
||||
rt_get_timer() -> bu_elapsed() [deprecated 7.16]
|
||||
mged
|
||||
make_bb -> bb [deprecated 7.16]
|
||||
|
||||
7.14
|
||||
----
|
||||
include/dm_color.h
|
||||
dm_color.h -> dm.h [deprecated 7.14]
|
||||
include/fb.h
|
||||
FB_WPIXEL -> fb_wpixel [deprecated 7.14]
|
||||
src/gtools
|
||||
g_[toolname] -> g[toolname] [deprecated 7.14]
|
||||
include/raytrace.h
|
||||
rt_fdiff -> NEAR_ZERO [deprecated 7.14]
|
||||
rt_reldiff -> NEAR_ZERO [deprecated 7.14]
|
||||
DIR_* -> RT_DIR_* [deprecated 7.14]
|
||||
mged
|
||||
tops -g -u -> now default behavior [deprecated 7.14]
|
||||
-n option -> -c option [deprecated 7.14]
|
||||
bots, per_line [deprecated 7.14]
|
||||
include/vmath.h
|
||||
VADD2_2D -> V2ADD2 [deprecated 7.14]
|
||||
VSUB2_2D -> V2SUB2 [deprecated 7.14]
|
||||
MAGSQ_2D -> MAG2SQ [deprecated 7.14]
|
||||
VDOT_2D -> V2DOT [deprecated 7.14]
|
||||
VMOVE_2D -> V2MOVE [deprecated 7.14]
|
||||
VSCALE_2D -> V2SCALE [deprecated 7.14]
|
||||
VJOIN1_2D -> V2JOIN1 [deprecated 7.14]
|
||||
|
||||
7.12
|
||||
----
|
||||
include/raytrace.h
|
||||
rt_functab size -> growing ft_label and new callbacks [deprecated 7.12]
|
||||
srt/librt/cmd.c
|
||||
rt_split_cmd() -> bu_argv_from_string() [deprecated 7.12]
|
||||
src/rt/viewarea.c
|
||||
terminology and output format [deprecated 7.12]
|
||||
include/raytrace.h
|
||||
RT_HIT_NORM -> RT_HIT_NORMAL [deprecated 7.12]
|
||||
|
||||
pre 7.0
|
||||
-------
|
||||
include/raytrace.h
|
||||
struct hit.hit_point -> RT_HIT_POINT [deprecated pre-7.0]
|
||||
struct hit.hit_normal -> RT_HIT_NORMAL [deprecated pre-7.0]
|
||||
|
||||
|
||||
************
|
||||
* OBSOLETE *
|
||||
************
|
||||
|
||||
Below are the interfaces that have followed deprecation policy and are
|
||||
now no longer a part of BRL-CAD.
|
||||
|
||||
|
||||
7.24.2
|
||||
------
|
||||
.pl file suffix
|
||||
.pl -> .plot3 [deprecated 7.16]
|
||||
*-pl
|
||||
*-pl -> *-plot3 [deprecated 7.16]
|
||||
pl*
|
||||
pl* -> plot3* [deprecated 7.16]
|
||||
|
||||
7.24.0
|
||||
------
|
||||
include/bu.h
|
||||
bu_get_public_cpus() [deprecated 7.16]
|
||||
bu_get_load_average() [deprecated 7.12]
|
||||
bu_fopen_uniq() -> fopen() [deprecated 7.14]
|
||||
src/other/jove
|
||||
jove -> emacs [deprecated 7.14]
|
||||
|
||||
7.22.0
|
||||
------
|
||||
include/bu.h
|
||||
%S format specifier -> %V format specifier for bu_vls [deprecated 7.14]
|
||||
|
||||
7.20.2
|
||||
------
|
||||
cat-fb
|
||||
obsolete hardware
|
||||
include/vmath.h
|
||||
ELEMENTS_PER_PT -> ELEMENTS_PER_POINT [deprecated 7.12]
|
||||
HVECT_LEN -> ELEMENTS_PER_HVECT [deprecated 7.12]
|
||||
HPT_LEN -> ELEMENTS_PER_HPOINT [deprecated 7.12]
|
||||
|
||||
7.20.0
|
||||
------
|
||||
include/bu.h
|
||||
bu_mro and related macros -> bu_attribute_value_set
|
||||
|
||||
7.18.2
|
||||
------
|
||||
include/raytrace.h
|
||||
RT_HIT_NORM -> RT_HIT_NORMAL [deprecated pre-7.0]
|
||||
g-shell.rect
|
||||
g-shell.rect renamed to g-shell-rect [minor tool rename]
|
||||
|
||||
7.18.0
|
||||
------
|
||||
include/raytrace.h
|
||||
db_free_external -> bu_free_external [deprecated pre-7.0]
|
||||
include/wdb.h
|
||||
mk_fastgen_region() -> mk_comb() [deprecated 7.12]
|
||||
src/librt/bomb.c
|
||||
rt_bomb() -> bu_bomb() [deprecated 7.10]
|
||||
include/machine.h
|
||||
machine.h -> common.h && bu.h [deprecated 7.10]
|
||||
src/vas4
|
||||
vas4 [deprecated 7.12]
|
||||
|
||||
7.16.4
|
||||
------
|
||||
include/raytrace.h
|
||||
get_solidbitv() -> rt_get_solidbitv() [deprecated 7.16]
|
||||
|
||||
7.14.4
|
||||
------
|
||||
include/pkg.h
|
||||
uses size_t for lengths in API calls
|
||||
include/bu.h
|
||||
bu_association() [unused]
|
||||
|
||||
7.14.0
|
||||
------
|
||||
include/raytrace.h
|
||||
GET_HITMISS -> NMG_GET_HITMISS
|
||||
mged
|
||||
edcolor -> color -e
|
||||
include/vmath.h
|
||||
PI -> M_PI
|
||||
M_SQRT2_DIV2 -> M_SQRT1_2
|
||||
|
||||
7.12.6
|
||||
------
|
||||
mged
|
||||
binary -> bo [rename]
|
||||
|
||||
7.12.4
|
||||
------
|
||||
include/mater.h
|
||||
rt_material_head -> rt_material_head() [deprecated 7.12]
|
||||
include/raytrace.h
|
||||
removed iterator from NMG_CK_HITMISS_LIST
|
||||
include/bu.h
|
||||
BU_QFLSTR -> BU_FLSTR
|
||||
|
||||
7.12.2
|
||||
------
|
||||
include/wdb.h
|
||||
mk_trc() -> mk_trc_h() and mk_trc_top() [deprecated pre-7.0]
|
||||
mk_bsolid() [deprecated pre-7.0]
|
||||
mk_bsurf() [deprecated pre-7.0]
|
||||
mk_strsol() -> mk_dsp(), mk_ebm(), mk_vol(), mk_submodel() [deprecated pre-7.0]
|
||||
mk_rcomb(), mk_fcomb(), mk_memb() -> mk_lcomb() and mk_addmember() [deprecated pre-7.0]
|
||||
mk_fwrite_internal() [deprecated pre-7.0]
|
||||
|
||||
7.12.0
|
||||
------
|
||||
include/common.h
|
||||
NATURAL_IEEE -> bu_byteorder() == BU_BIG_ENDIAN || defined(WORDS_BIGENDIAN)
|
||||
REVERSE_IEEE -> bu_byteorder() == BU_LITTLE_ENDIAN
|
||||
include/bu.h
|
||||
bu_log(char *, ...) -> bu_log(const char *, ...) [const]
|
||||
bu_flog(FILE *, char *, ...) -> bu_flog(FILE *, const char *, ...) [const]
|
||||
bu_vls_printf(struct bu_vls *, char *) -> bu_vls_printf(struct bu_vls *, const char *) [const]
|
||||
bu_vls_sprintf(struct bu_vls *, char *) -> bu_vls_sprintf(struct bu_vls *, const char *) [const]
|
||||
include/wdb.h
|
||||
removed mk_poly() [deprecated pre-7.0]
|
||||
removed mk_polysolid() [deprecated pre-7.0]
|
||||
removed mk_fpoly() [deprecated pre-7.0]
|
||||
removed write_shell_as_polysolid() [deprecated 6.0]
|
||||
include/bu.h
|
||||
char *bu_brlcad_path() -> const char *bu_brlcad_path() [const]
|
||||
include/bn.h
|
||||
bn_mat_zero() -> MAT_ZERO() [deprecated pre-7.0]
|
||||
bn_mat_idn() -> MAT_IDN() [deprecated pre-7.0]
|
||||
bn_mat_copy() -> MAT_COPY() [deprecated pre-7.0]
|
||||
include/compat4.h
|
||||
compat4.h -> bu.h && bn.h [deprecated 5.0]
|
||||
include/raytrace.h
|
||||
rt_overlap_quietly() -> struct application.a_logoverlap = rt_silent_logoverlap [deprecated pre 7.0]
|
||||
include/bu.h
|
||||
bu_brlcad_path() -> bu_brlcad_root() || bu_brlcad_data() [deprecated 7.4]
|
||||
bu_tcl_brlcad_path() -> bu_tcl_brlcad_root() || bu_tcl_brlcad_data() [deprecated 7.4]
|
||||
include/fb.h
|
||||
fb_log(char *fmt) -> fb_log(const char *fmt) [const]
|
||||
include/noalias-prag.h
|
||||
removed [non-stdc]
|
||||
include/noalias.h
|
||||
removed [non-stdc]
|
||||
src/librt/wdb_obj.c -> src/librt/db_obj.c
|
||||
removed wdb_tree_cmd(), added dgo_tree_cmd() [rename]
|
||||
mged
|
||||
dbbinary -> binary [rename]
|
||||
|
||||
7.10.4
|
||||
------
|
||||
include/msr.h [pre 7.0]
|
||||
msr.h -> bu.h
|
||||
include/rtlist.h [pre 7.0]
|
||||
rtlist.h -> bu.h
|
||||
include/rtstring.h [pre 7.0]
|
||||
rtstring.h -> bu.h
|
||||
include/shortvect.h [pre 7.0]
|
||||
include/shortvect-pr.h [pre 7.0]
|
||||
|
||||
7.10.2
|
||||
------
|
||||
include/raytrace.h
|
||||
rt_version -> rt_version() [private]
|
||||
include/[library].h (several)
|
||||
[library]_version -> [library]_version() [private]
|
||||
|
||||
|
||||
***********************************
|
||||
* MINIMALLY IMPACTING API CHANGES *
|
||||
***********************************
|
||||
|
||||
Included in following are various minimally impacting API changes that
|
||||
have been identified in chronological order. As expressions are not
|
||||
extensively tested, use with caution.
|
||||
|
||||
Unless noted otherwise, expressions are shown using Perl syntax and
|
||||
may need adjustment (particularly quoting of '(', ')', and '|'
|
||||
characters) for other environments. Most expressions will apply with:
|
||||
perl -0777 -pi -e 'EXPRESSION' FILE
|
||||
|
||||
|
||||
6.0 (sed lines)
|
||||
---
|
||||
g/struct structparse/s//struct bu_structparse/g
|
||||
g/struct rt_mapped_file/s//struct bu_mapped_file/g
|
||||
g/struct rt_list/s//struct bu_list/g
|
||||
g/struct histogram/s//struct bu_hist/g
|
||||
g/complex /s//bn_complex_t /g
|
||||
g/GETSTRUCT/s//BU_GETSTRUCT/g
|
||||
g/GETUNION/s//BU_GETUNION/g
|
||||
g/nmg_tbl.*(\(.*\), TBL_INIT[ ]*, \(.*\))/s//bu_ptbl_init(\1, 64, "\1")/
|
||||
g/nmg_tbl.*(\(.*\), TBL_RST[ ]*, \(.*\))/s//bu_ptbl_reset(\1)/
|
||||
g/nmg_tbl.*(\(.*\), TBL_INS[ ]*, \(.*\))/s//bu_ptbl_ins(\1, \2)/
|
||||
g/nmg_tbl.*(\(.*\), TBL_LOC[ ]*, \(.*\))/s//bu_ptbl_locate(\1, \2)/
|
||||
g/nmg_tbl.*(\(.*\), TBL_ZERO[ ]*, \(.*\))/s//bu_ptbl_zero(\1, \2)/
|
||||
g/nmg_tbl.*(\(.*\), TBL_INS_UNIQUE[ ]*, \(.*\))/s//bu_ptbl_ins_unique(\1, \2)/
|
||||
g/nmg_tbl.*(\(.*\), TBL_RM[ ]*, \(.*\))/s//bu_ptbl_rm(\1, \2)/
|
||||
g/nmg_tbl.*(\(.*\), TBL_CAT[ ]*, \(.*\))/s//bu_ptbl_cat(\1, \2)/
|
||||
g/nmg_tbl.*(\(.*\), TBL_FREE[ ]*, \(.*\))/s//bu_ptbl_free(\1)/
|
||||
g/nmg_tbl/s//bu_ptbl/g
|
||||
g/nmg_ptbl/s//bu_ptbl/g
|
||||
g/MSR_UNIF/s//BN_UNIF/g
|
||||
g/MSR_GAUSS/s//BN_GAUSS/g
|
||||
g/MSR_CK/s//BU_CK/g
|
||||
g/msr_unif/s//bn_unif/g
|
||||
g/msr_gauss/s//bn_gauss/g
|
||||
g/RT_CKMAG/s//BU_CKMAG/g
|
||||
g/RT_TOL_MAGIC/s//BN_TOL_MAGIC/g
|
||||
g/RT_CK_TOL/s//BN_CK_TOL/g
|
||||
g/RT_VECT_ARE_PARALLEL/s//BN_VECT_ARE_PARALLEL/g
|
||||
g/RT_VECT_ARE_PERP/s//BN_VECT_ARE_PERP/g
|
||||
g/rt_badmagic/s//bu_badmagic/g
|
||||
g/RT_SETJUMP/s//BU_SETJUMP/g
|
||||
g/RT_UNSETJUMP/s//BU_UNSETJUMP/g
|
||||
g/rt_twopi/s//bn_twopi/g
|
||||
g/rt_halfpi/s//bn_halfpi/g
|
||||
g/rt_quarterpi/s//bn_quarterpi/g
|
||||
g/rt_invpi/s//bn_invpi/g
|
||||
g/rt_inv2pi/s//bn_inv2pi/g
|
||||
g/rt_inv4pi/s//bn_inv4pi/g
|
||||
g/rt_inv255/s//bn_inv255/g
|
||||
g/rt_degtorad/s//bn_degtorad/g
|
||||
g/rt_radtodeg/s//bn_radtodeg/g
|
||||
g/RT_HISTOGRAM_MAGIC/s//BU_HIST_MAGIC/g
|
||||
g/RT_CK_HISTOGRAM/s//BU_CK_HIST/g
|
||||
g/RT_HISTOGRAM_TALLY/s//BU_HIST_TALLY/g
|
||||
g/rt_hist_free/s//bu_hist_free/g
|
||||
g/rt_hist_init/s//bu_hist_init/g
|
||||
g/rt_hist_range/s//bu_hist_range/g
|
||||
g/rt_hist_pr/s//bu_hist_pr/g
|
||||
g/RT_LIST_HEAD_MAGIC/s//BU_LIST_HEAD_MAGIC/g
|
||||
g/RT_LIST_NULL/s//BU_LIST_NULL/g
|
||||
g/RT_LIST_INSERT/s//BU_LIST_INSERT/g
|
||||
g/RT_LIST_APPEND/s//BU_LIST_APPEND/g
|
||||
g/RT_LIST_DEQUEUE/s//BU_LIST_DEQUEUE/g
|
||||
g/RT_LIST_PUSH/s//BU_LIST_PUSH/g
|
||||
g/RT_LIST_POP/s//BU_LIST_POP/g
|
||||
g/RT_LIST_INSERT_LIST/s//BU_LIST_INSERT_LIST/g
|
||||
g/RT_LIST_APPEND_LIST/s//BU_LIST_APPEND_LIST/g
|
||||
g/RT_LIST_IS_EMPTY/s//BU_LIST_IS_EMPTY/g
|
||||
g/RT_LIST_NON_EMPTY/s//BU_LIST_NON_EMPTY/g
|
||||
g/RT_LIST_NON_EMPTY_P/s//BU_LIST_NON_EMPTY_P/g
|
||||
g/RT_LIST_IS_CLEAR/s//BU_LIST_IS_CLEAR/g
|
||||
g/RT_LIST_UNINITIALIZED/s//BU_LIST_UNINITIALIZED/g
|
||||
g/RT_LIST_INIT/s//BU_LIST_INIT/g
|
||||
g/RT_LIST_MAGIC_SET/s//BU_LIST_MAGIC_SET/g
|
||||
g/RT_LIST_MAGIC_OK/s//BU_LIST_MAGIC_OK/g
|
||||
g/RT_LIST_MAGIC_WRONG/s//BU_LIST_MAGIC_WRONG/g
|
||||
g/RT_LIST_IS_HEAD/s//BU_LIST_IS_HEAD/g
|
||||
g/RT_LIST_NOT_HEAD/s//BU_LIST_NOT_HEAD/g
|
||||
g/RT_CK_LIST_HEAD/s//BU_CK_LIST_HEAD/g
|
||||
g/RT_LIST_NEXT_IS_HEAD/s//BU_LIST_NEXT_IS_HEAD/g
|
||||
g/RT_LIST_NEXT_NOT_HEAD/s//BU_LIST_NEXT_NOT_HEAD/g
|
||||
g/RT_LIST_FOR2/s//BU_LIST_FOR2/g
|
||||
g/RT_LIST_FOR/s//BU_LIST_FOR/g
|
||||
g/RT_LIST_WHILE/s//BU_LIST_WHILE/g
|
||||
g/RT_LIST_FIRST_MAGIC/s//BU_LIST_FIRST_MAGIC/g
|
||||
g/RT_LIST_LAST_MAGIC/s//BU_LIST_LAST_MAGIC/g
|
||||
g/RT_LIST_PNEXT_PNEXT/s//BU_LIST_PNEXT_PNEXT/g
|
||||
g/RT_LIST_PNEXT_PLAST/s//BU_LIST_PNEXT_PLAST/g
|
||||
g/RT_LIST_PLAST_PNEXT/s//BU_LIST_PLAST_PNEXT/g
|
||||
g/RT_LIST_PLAST_PLAST/s//BU_LIST_PLAST_PLAST/g
|
||||
g/RT_LIST_PNEXT_CIRC/s//BU_LIST_PNEXT_CIRC/g
|
||||
g/RT_LIST_PPREV_CIRC/s//BU_LIST_PPREV_CIRC/g
|
||||
g/RT_LIST_PLAST_CIRC/s//BU_LIST_PPREV_CIRC/g
|
||||
g/RT_LIST_MAIN_PTR/s//BU_LIST_MAIN_PTR/g
|
||||
g/RT_LIST_PNEXT/s//BU_LIST_PNEXT/g
|
||||
g/RT_LIST_PLAST/s//BU_LIST_PLAST/g
|
||||
g/RT_LIST_LAST/s//BU_LIST_LAST/g
|
||||
g/RT_LIST_PREV/s//BU_LIST_PREV/g
|
||||
g/RT_LIST_FIRST/s//BU_LIST_FIRST/g
|
||||
g/RT_LIST_NEXT/s//BU_LIST_NEXT/g
|
||||
g/rt_log/s//bu_log/g
|
||||
g/rt_add_hook/s//bu_add_hook/g
|
||||
g/rt_delete_hook/s//bu_delete_hook/g
|
||||
g/rt_putchar/s//bu_putchar/g
|
||||
g/rt_flog/s//bu_flog/g
|
||||
g/rt_identify_magic/s//bu_identify_magic/g
|
||||
g/rt_identity/s//bn_mat_identity/g
|
||||
g/rt_prmem/s//bu_prmem/g
|
||||
g/rt_strdup/s//bu_strdup/g
|
||||
g/rt_malloc/s//bu_malloc/g
|
||||
g/rt_calloc/s//bu_calloc/g
|
||||
g/rt_free/s//bu_free/g
|
||||
g/rt_byte_roundup/s//bu_malloc_len_roundup/g
|
||||
g/rt_mem_barriercheck/s//bu_mem_barriercheck/g
|
||||
g/rt_open_mapped_file/s//bu_open_mapped_file/g
|
||||
g/rt_close_mapped_file/s//bu_close_mapped_file/g
|
||||
g/RT_CK_MAPPED_FILE/s//BU_CK_MAPPED_FILE/g
|
||||
g/noise_init/s//bn_noise_init/g
|
||||
g/noise_perlin/s//bn_noise_perlin/g
|
||||
g/noise_vec/s//bn_noise_vec/g
|
||||
g/noise_fbm/s//bn_noise_fbm/g
|
||||
g/noise_turb/s//bn_noise_turb/g
|
||||
g/rt_pri_set/s//bu_nice_set/g
|
||||
g/rt_cpuget/s//bu_cpulimit_get/g
|
||||
g/rt_cpuset/s//bu_cpulimit_set/g
|
||||
g/rt_avail_cpus/s//bu_avail_cpus/g
|
||||
g/rt_parallel/s//bu_parallel/g
|
||||
g/rt_struct_export/s//bu_struct_export/g
|
||||
g/rt_struct_import/s//bu_struct_import/g
|
||||
g/rt_struct_put/s//bu_struct_put/g
|
||||
g/rt_struct_get/s//bu_struct_get/g
|
||||
g/rt_gshort/s//bu_gshort/g
|
||||
g/rt_glong/s//bu_glong/g
|
||||
g/rt_pshort/s//bu_pshort/g
|
||||
g/rt_plong/s//bu_plong/g
|
||||
g/rt_struct_buf/s//bu_struct_wrap_buf/g
|
||||
g/rt_structparse/s//bu_struct_parse/g
|
||||
g/rt_structprint/s//bu_struct_print/g
|
||||
g/rt_vls_structprint/s//bu_vls_struct_print/g
|
||||
g/offsetofarray/s//bu_offsetofarray/g
|
||||
g/ FUNC_NULL/s// BU_STRUCTPARSE_FUNC_NULL/g
|
||||
g/rt_external/s//bu_external/g
|
||||
g/RT_EXTERNAL_MAGIC/s//BU_EXTERNAL_MAGIC/g
|
||||
g/RT_EXTERN/s//BU_EXTERN/g
|
||||
g/RT_INIT_EXTERNAL/s//BU_INIT_EXTERNAL/g
|
||||
g/RT_CK_EXTERNAL/s//BU_CK_EXTERNAL/g
|
||||
g/rt_dist_pt3_lseg3/s//bn_dist_pt3_lseg3/g
|
||||
g/rt_3pts_collinear/s//bn_3pts_collinear/g
|
||||
g/rt_pt3_pt3_equal/s//bn_pt3_pt3_equal/g
|
||||
g/rt_dist_pt2_lseg2/s//bn_dist_pt2_lseg2/g
|
||||
g/rt_isect_lseg3_lseg3/s//bn_isect_lseg3_lseg3/g
|
||||
g/rt_isect_line3_line3/s//bn_isect_line3_line3/g
|
||||
g/rt_2line3_colinear/s//bn_2line3_colinear/g
|
||||
g/rt_isect_pt2_lseg2/s//bn_isect_pt2_lseg2/g
|
||||
g/rt_isect_line2_lseg2/s//bn_isect_line2_lseg2/g
|
||||
g/rt_isect_lseg2_lseg2/s//bn_isect_lseg2_lseg2/g
|
||||
g/rt_isect_line2_line2/s//bn_isect_line2_line2/g
|
||||
g/rt_dist_line_point/s//bn_dist_line3_pt3/g
|
||||
g/rt_dist_pt3_pt3/s//bn_dist_pt3_pt3/g
|
||||
g/rt_3pts_distinct/s//bn_3pts_distinct/g
|
||||
g/rt_mk_plane_3pts/s//bn_mk_plane_3pts/g
|
||||
g/rt_mkpoint_3planes/s//bn_mkpoint_3planes/g
|
||||
g/rt_isect_line3_plane/s//bn_isect_line3_plane/g
|
||||
g/rt_isect_2planes/s//bn_isect_2planes/g
|
||||
g/rt_isect_2lines/s//bn_isect_2lines/g
|
||||
g/rt_isect_line_lseg/s//bn_isect_line_lseg/g
|
||||
g/rt_dist_line3_pt3/s//bn_dist_line3_pt3/g
|
||||
g/rt_distsq_line3_pt3/s//bn_distsq_line3_pt3/g
|
||||
g/rt_dist_line_origin/s//bn_dist_line_origin/g
|
||||
g/rt_dist_line2_point2/s//bn_dist_line2_point2/g
|
||||
g/rt_distsq_line2_point2/s//bn_distsq_line2_point2/g
|
||||
g/rt_area_of_triangle/s//bn_area_of_triangle/g
|
||||
g/rt_isect_pt_lseg/s//bn_isect_pt_lseg/g
|
||||
g/rt_dist_pt_lseg/s//bn_dist_pt_lseg/g
|
||||
g/rt_rotate_bbox/s//bn_rotate_bbox/g
|
||||
g/rt_rotate_plane/s//bn_rotate_plane/g
|
||||
g/rt_coplanar/s//bn_coplanar/g
|
||||
g/rt_angle_measure/s//bn_angle_measure/g
|
||||
g/rt_dist_pt3_along_line3/s//bn_dist_pt3_along_line3/g
|
||||
g/rt_dist_pt2_along_line2/s//bn_dist_pt2_along_line2/g
|
||||
g/rt_between/s//bn_between/g
|
||||
g/rt_printb/s//bu_printb/g
|
||||
g/NMG_CK_PTBL/s//BU_CK_PTBL/g
|
||||
g/NMG_TBL_BASEADDR/s//BU_PTBL_BASEADDR/g
|
||||
g/NMG_TBL_LASTADDR/s//BU_PTBL_LASTADDR/g
|
||||
g/NMG_TBL_END/s//BU_PTBL_END/g
|
||||
g/NMG_TBL_GET/s//BU_PTBL_GET/g
|
||||
g/RT_RAND_TABSIZE/s//BN_RAND_TABSIZE/g
|
||||
g/RT_RANDSEED/s//BN_RANDSEED/g
|
||||
g/RT_RANDOM/s//BN_RANDOM/g
|
||||
g/rt_rand_table/s//bn_rand_table/g
|
||||
g/rt_tol/s//bn_tol/g
|
||||
g/RES_ACQUIRE(/s//bu_semaphore_acquire(/
|
||||
g/RES_RELEASE(/s//bu_semaphore_release(/
|
||||
g/&rt_g.res_syscall/s//BU_SEM_SYSCALL/
|
||||
g/&rt_g.res_worker/s//RT_SEM_WORKER/
|
||||
g/&rt_g.res_stats/s//RT_SEM_STATS/
|
||||
g/&rt_g.res_results/s//RT_SEM_RESULTS/
|
||||
g/&rt_g.res_model/s//RT_SEM_MODEL/
|
||||
g/RES_INIT(/s/RES_INIT.*;/bu_semaphore_init( RT_SEM_LAST );/p
|
||||
g/RT_VLS_CHECK/s//BU_CK_VLS/g
|
||||
g/RT_VLS_ADDR/s//bu_vls_addr/g
|
||||
g/RT_VLS_INIT/s//bu_vls_init/g
|
||||
g/rt_vls_init/s//bu_vls_init/g
|
||||
g/rt_vls_vlsinit/s//bu_vls_vlsinit/g
|
||||
g/rt_vls_addr/s//bu_vls_addr/g
|
||||
g/rt_vls_strdup/s//bu_vls_strdup/g
|
||||
g/rt_vls_strgrab/s//bu_vls_strgrab/g
|
||||
g/rt_vls_extend/s//bu_vls_extend/g
|
||||
g/rt_vls_setlen/s//bu_vls_setlen/g
|
||||
g/rt_vls_strlen/s//bu_vls_strlen/g
|
||||
g/rt_vls_trunc/s//bu_vls_trunc/g
|
||||
g/rt_vls_trunc2/s//bu_vls_trunc2/g
|
||||
g/rt_vls_nibble/s//bu_vls_nibble/g
|
||||
g/rt_vls_free/s//bu_vls_free/g
|
||||
g/rt_vls_vlsfree/s//bu_vls_vlsfree/g
|
||||
g/rt_vls_strcpy/s//bu_vls_strcpy/g
|
||||
g/rt_vls_strncpy/s//bu_vls_strncpy/g
|
||||
g/rt_vls_strcat/s//bu_vls_strcat/g
|
||||
g/rt_vls_strncat/s//bu_vls_strncat/g
|
||||
g/rt_vls_vlscat/s//bu_vls_vlscat/g
|
||||
g/rt_vls_vlscatzap/s//bu_vls_vlscatzap/g
|
||||
g/rt_vls_from_argv/s//bu_vls_from_argv/g
|
||||
g/rt_vls_fwrite/s//bu_vls_fwrite/g
|
||||
g/rt_vls_gets/s//bu_vls_gets/g
|
||||
g/rt_vls_putc/s//bu_vls_putc/g
|
||||
g/rt_vls_printf/s//bu_vls_printf/g
|
||||
g/CxCopy/s//bn_cx_copy/g
|
||||
g/CxNeg/s//bn_cx_neg/g
|
||||
g/CxReal/s//bn_cx_real/g
|
||||
g/CxImag/s//bn_cx_imag/g
|
||||
g/CxAdd/s//bn_cx_add/g
|
||||
g/CxAmplSq/s//bn_cx_amplsq/g
|
||||
g/CxAmpl/s//bn_cx_ampl/g
|
||||
g/CxConj/s//bn_cx_conj/g
|
||||
g/CxCons/s//bn_cx_cons/g
|
||||
g/CxPhas/s//bn_cx_phas/g
|
||||
g/CxScal/s//bn_cx_scal/g
|
||||
g/CxSub/s//bn_cx_sub/g
|
||||
g/CxMul/s//bn_cx_mul/g
|
||||
g/CxMul2/s//bn_cx_mul2/g
|
||||
g/CxDiv/s//bn_cx_div/g
|
||||
g/rt_poly_scale/s//bn_poly_scale/g
|
||||
g/rt_pr_poly/s//bn_pr_poly/g
|
||||
g/rt_pr_roots/s//bn_pr_roots/g
|
||||
g/TBL_INIT/s//BU_PTBL_INIT/g
|
||||
g/TBL_INS/s//BU_PTBL_INS/g
|
||||
g/TBL_LOC/s//BU_PTBL_LOC/g
|
||||
g/TBL_FREE/s//BU_PTBL_FREE/g
|
||||
g/TBL_RST/s//BU_PTBL_RST/g
|
||||
g/TBL_CAT/s//BU_PTBL_CAT/g
|
||||
g/TBL_RM/s//BU_PTBL_RM/g
|
||||
g/TBL_INS_UNIQUE/s//BU_PTBL_INS_UNIQUE/g
|
||||
g/TBL_ZERO/s//BU_PTBL_ZERO/g
|
||||
g/rt_pi/s//bn_pi/g
|
||||
g/matXvec/s//bn_matXvec/g
|
||||
g/mat_ae/s//bn_mat_ae/g
|
||||
g/mat_ae_vec/s//bn_ae_vec/g
|
||||
g/mat_aet_vec/s//bn_aet_vec/g
|
||||
g/mat_angles/s//bn_mat_angles/g
|
||||
g/mat_arb_rot/s//bn_mat_arb_rot/g
|
||||
g/mat_atan2/s//bn_atan2/g
|
||||
g/mat_copy/s//bn_mat_copy/g
|
||||
g/mat_degtorad/s//bn_degtorad/g
|
||||
g/mat_dup/s//bn_mat_dup/g
|
||||
g/mat_eigen2x2/s//bn_eigen2x2/g
|
||||
g/mat_fromto/s//bn_mat_fromto/g
|
||||
g/mat_htov_move/s//bn_htov_move/g
|
||||
g/mat_identity/s//bn_mat_identity/g
|
||||
g/mat_idn/s//MAT_IDN/g
|
||||
g/mat_inv/s//bn_mat_inv/g
|
||||
g/rt_mat_is_equal/s//bn_mat_is_equal/g
|
||||
g/mat_is_identity/s//bn_mat_is_identity/g
|
||||
g/mat_lookat/s//bn_mat_lookat/g
|
||||
g/mat_mul/s//bn_mat_mul/g
|
||||
g/mat_mul2/s//bn_mat_mul2/g
|
||||
g/mat_print/s//bn_mat_print/g
|
||||
g/mat_radtodeg/s//bn_radtodeg/g
|
||||
g/mat_scale_about_pt/s//bn_mat_scale_about_pt/g
|
||||
g/mat_trn/s//bn_mat_trn/g
|
||||
g/mat_vec_ortho/s//bn_vec_ortho/g
|
||||
g/mat_vec_perp/s//bn_vec_perp/g
|
||||
g/mat_vtoh_move/s//bn_vtoh_move/g
|
||||
g/mat_xform_about_pt/s//bn_mat_xform_about_pt/g
|
||||
g/mat_xrot/s//bn_mat_xrot/g
|
||||
g/mat_yrot/s//bn_mat_yrot/g
|
||||
g/mat_zrot/s//bn_mat_zrot/g
|
||||
g/mat_zero/s//bn_mat_zero/g
|
||||
g/rb_tree/s//bu_rb_tree/g
|
||||
g/RB_TREE_NULL/s//BU_RB_TREE_NULL/g
|
||||
g/rb_min/s//bu_rb_min/g
|
||||
g/rb_max/s//bu_rb_max/g
|
||||
g/rb_pred/s//bu_rb_pred/g
|
||||
g/rb_succ/s//bu_rb_succ/g
|
||||
g/rb_create/s//bu_rb_create/g
|
||||
g/rb_create1/s//bu_rb_create1/g
|
||||
g/rb_delete/s//bu_rb_delete/g
|
||||
g/rb_diagnose_tree/s//bu_rb_diagnose_tree/g
|
||||
g/rb_extreme/s//bu_rb_extreme/g
|
||||
g/rb_insert/s//bu_rb_insert/g
|
||||
g/rb_neighbor/s//bu_rb_neighbor/g
|
||||
g/rb_search/s//bu_rb_search/g
|
||||
g/rb_search1/s//bu_rb_search1/g
|
||||
g/rb_summarize_tree/s//bu_rb_summarize_tree/g
|
||||
g/rb_walk/s//bu_rb_walk/g
|
||||
g/rb_walk1/s//bu_rb_walk1/g
|
||||
g/RT_VLIST_CHUNK/s//BN_VLIST_CHUNK/g
|
||||
g/rt_vlist/s//bn_vlist/g
|
||||
g/RT_VLIST_NULL/s//BN_VLIST_NULL/g
|
||||
g/RT_VLIST_MAGIC/s//BN_VLIST_MAGIC/g
|
||||
g/RT_CK_VLIST/s//BN_CK_VLIST/g
|
||||
g/RT_VLIST_LINE_MOVE/s//BN_VLIST_LINE_MOVE/g
|
||||
g/RT_VLIST_LINE_DRAW/s//BN_VLIST_LINE_DRAW/g
|
||||
g/RT_VLIST_POLY_START/s//BN_VLIST_POLY_START/g
|
||||
g/RT_VLIST_POLY_MOVE/s//BN_VLIST_POLY_MOVE/g
|
||||
g/RT_VLIST_POLY_DRAW/s//BN_VLIST_POLY_DRAW/g
|
||||
g/RT_VLIST_POLY_END/s//BN_VLIST_POLY_END/g
|
||||
g/RT_VLIST_POLY_VERTNORM/s//BN_VLIST_POLY_VERTNORM/g
|
||||
g/rt_vlblock/s//bn_vlblock/g
|
||||
g/RT_VLBLOCK_MAGIC/s//BN_VLBLOCK_MAGIC/g
|
||||
g/RT_CK_VLBLOCK/s//BN_CK_VLBLOCK/g
|
||||
g/BU_BU_/s//BU_/g
|
||||
g/bu_bu_/s//bu_/g
|
||||
g/bn_bn_/s//bn_/g
|
||||
g/bn_pipe/s//rt_pipe/g
|
||||
major API overhaul [6.0]
|
||||
7.14
|
||||
----
|
||||
s/rt_db_free_internal\(([^,]+),[^\)]*\)/rt_db_free_internal(\1)/g
|
||||
struct resource pointer parameter removed [7.14]
|
||||
|
||||
7.16
|
||||
----
|
||||
s/rt_ptalloc\(\);/(struct rt_pt_node *)bu_malloc(sizeof(struct rt_pt_node), "rt_pt_node");/g
|
||||
rt_ptalloc() removed [7.16]
|
||||
|
||||
7.18
|
||||
----
|
||||
s/bu_ptbl\(([^,]*),[[:space:]]*BU_PTBL_INIT([^\)]*)\)/bu_ptbl_init(\1, 64, "init")/g
|
||||
s/bu_ptbl\(([^,]*),[[:space:]]*BU_PTBL_RST([^\)]*)\)/bu_ptbl_reset(\1)/g
|
||||
s/bu_ptbl\(([^,]*),[[:space:]]*BU_PTBL_INS([^\)]*)\)/bu_ptbl_ins(\1\2)/g
|
||||
s/bu_ptbl\(([^,]*),[[:space:]]*BU_PTBL_LOC([^\)]*)\)/bu_ptbl_locate(\1\2)/g
|
||||
s/bu_ptbl\(([^,]*),[[:space:]]*BU_PTBL_ZERO([^\)]*)\)/bu_ptbl_zero(\1\2/g
|
||||
s/bu_ptbl\(([^,]*),[[:space:]]*BU_PTBL_INS_UNIQUE([^\)]*)\)/bu_ptbl_ins_unique(\1\2)/g
|
||||
s/bu_ptbl\(([^,]*),[[:space:]]*BU_PTBL_RM([^\)]*)\)/bu_ptbl_rm(\1\2)/g
|
||||
s/bu_ptbl\(([^,]*),[[:space:]]*BU_PTBL_CAT([^\)]*)\)/bu_ptbl_cat(\1\2)/g
|
||||
s/bu_ptbl\(([^,]*),[[:space:]]*BU_PTBL_FREE([^\)]*)\)/bu_ptbl_free(\1)/g
|
||||
bu_ptbl() removed [7.18]
|
||||
|
||||
s/nmg_struct_counts\(/nmg_pr_m_struct_counts(/g
|
||||
nmg_struct_counts() renamed to nmg_pr_m_struct_counts() [7.18]
|
||||
|
||||
s/bu_vlb_getBuffer\(/bu_vlb_addr(/g
|
||||
bu_vlb_getBuffer() renamed to bu_vlb_addr() [7.18]
|
||||
|
||||
s/bu_vlb_getBufferLength\(/bu_vlb_buflen(/g
|
||||
bu_vlb_getBufferLength() renamed to bu_vlb_buflen() [7.18]
|
||||
|
||||
s/V2APPROXEQUAL\(/V2NEAR_EQUAL(/g
|
||||
V2APPROXEQUAL() renamed to V2NEAR_EQUAL() [7.18]
|
||||
|
||||
s/VAPPROXEQUAL\(/VNEAR_EQUAL(/g
|
||||
VAPPROXEQUAL() renamed to VNEAR_EQUAL() [7.18]
|
||||
|
||||
s/db_get_version\(/db_version(/g
|
||||
db_get_version() renamed to db_version() [7.18]
|
||||
|
||||
s/db_get_directory_size\(/db_directory_size(/g
|
||||
db_get_directory_size() renamed to db_directory_size() [7.18]
|
||||
|
||||
s/db_get_directory\(/db_alloc_directory_block(/g
|
||||
db_get_directory() renamed to db_alloc_directory_block() [7.18]
|
||||
|
||||
s/rt_get_seg\(/rt_alloc_sed_block(/g
|
||||
rt_get_seg() renamed to rt_alloc_seg_block() [7.18]
|
||||
|
||||
s/db_shader_mat\(/rt_shader_mat(/g
|
||||
db_shader_mat() renamed to rt_shader_mat() [7.18]
|
||||
|
||||
s/SMALL([^_])/SMALL_FAST\1/g
|
||||
SMALL renamed to SMALL_FASTF [7.18]
|
||||
|
||||
7.20
|
||||
----
|
||||
s/spm_([^\)]*)/bn_spm_\1/g
|
||||
spm functions and types renamed to bn_spm [7.20]
|
||||
|
||||
s/RT_CK_SPM/BN_CK_SPM_MAP/g
|
||||
RT_CK_SPM macro renamed to BN_CK_SPM MAP [7.20]
|
||||
|
||||
s/SPM_MAGIC/BN_SPM_MAGIC/g
|
||||
SPM_MAGIC renamed to BN_SPM_MAGIC [7.20]
|
||||
|
||||
s/SPM_NULL/BN_SPM_MAP_NULL/g
|
||||
SPM_NULL renamed to BN_SPM_MAP_NULL [7.20]
|
||||
|
||||
s/BU_EXTERN[[:space:]]*\([[:space:]]*([^,]*?)[[:space:]]*,[[:space:]]*\([[:space:]]*([^)]*)[[:space:]]*\)[[:space:]]*\)/extern \1(\2)/g
|
||||
BU_EXTERN() no longer necessary due to C89 minimum, use extern [7.20]
|
||||
|
||||
s/[[:space:]]*BU_ARGS[[:space:]]*\([[:space:]]*([^)]*[[:space:]]*)[[:space:]]*\)/\1/g
|
||||
BU_ARGS() no longer necessary due to C89 minimum, list args [7.20]
|
||||
|
||||
s/BU_LIST_UNINITIALIZED/!BU_LIST_IS_INITIALIZED/g
|
||||
BU_LIST_IS_INITIALIZED() removed for consistency [7.20]
|
||||
|
||||
s/BU_INIT_EXTERNAL/BU_EXTERNAL_INIT/g
|
||||
renamed for API consistency [7.20]
|
||||
|
||||
s/RT_CK_DBTR/RT_CK_DB_TRAVERSE/g
|
||||
s/RT_DBTR_MAGIC/RT_DB_TRAVERSE_MAGIC/g
|
||||
renamed for API consistency [7.20]
|
||||
|
||||
s/RT_INIT_([A-Z_]*)/RT_\1_INIT/g
|
||||
renamed all RT_INIT_[type] macros to RT_[type]_INIT for API consistency [7.20]
|
||||
|
||||
s/BU_LIST_MAGIC_OK/BU_LIST_MAGIC_EQUAL/g
|
||||
s/BU_LIST_MAGIC_WRONG/!BU_LIST_MAGIC_EQUAL/g
|
||||
renamed and consolidated to be consistent with libbn [7.20]
|
||||
|
||||
s/nmg_moveeu/nmg_je/g
|
||||
function has been renamed
|
||||
|
||||
7.22
|
||||
----
|
||||
|
||||
s/rt_dist_pt3_line3/bn_dist_pt3_line3/g
|
||||
s/rt_dist_line3_line3/bn_dist_line3_line3/g
|
||||
s/rt_dist_line3_lseg3/bn_dist_line3_lseg3/g
|
||||
functions moved from librt to libbn [7.21]
|
||||
s/bu_tcl_setup/Bu_Init/g
|
||||
removed bu_tcl_setup() in favor of Bu_Init() [7.21]
|
||||
s/bu_tcl_([^(]*)\([^,]*?[[:space:]]*,[^,]*?[[:space:]]*,(.*)/bu_\1(\2/g
|
||||
removed all bu_tcl_*() functions, leaving off interp and using native bu function [7.21]
|
||||
s/bu_badmagic_tcl\([^,]*?[[:space:]]*,(.*)/bu_badmagic(\1/g
|
||||
removed bu_badmagic_tcl() in favor of bu_badmagic() [7.21]
|
||||
s/(.*)_CK(.*)_TCL\([^,]*?[[:space:]]*,(.*)/\1_CK\2(\3/g
|
||||
removed all *_CK*_TCL() macros (e.g., BU_CKMAG_TCL, RT_CK_DBI_TCL, etc.) in favor of non-TCL macros [7.21]
|
||||
s/bu_image/icv_image/g
|
||||
moved bu_image* functions to libicv as icv_image* [7.21]
|
||||
s/BU_IMAGE/ICV_IMAGE/g
|
||||
moved BU_IMAGE* macros to icv.h as ICV_IMAGE* [7.21]
|
||||
s/bu_cmd\(([^,]*?),[[:space:]]*([^,]*?),[[:space:]]*([^,]*?),[[:space:]]*([^,)]*?),[[:space:]]*([^)]*?)\)/bu_cmd(\4, \2, \3, \5, \1, NULL)/g
|
||||
inputs then outputs. swapped bu_cmd's 4th parameter to 1st, 1st to 5th, and added a new return value hook last. [7.21]
|
||||
s/V3(.*)_TOL\(([^,]*,)([^,]*,)([^,]*,)([^)]*)\)/V3\1_TOL(\1\2\3(\4)->dist)/g
|
||||
V3RPP_OVERLAP_TOL(), V3PT_IN_RPP_TOL(), and V3PT_OUT_RPP_TOL() tol parameter changed to value [7.21]
|
||||
s/BU_GETSTRUCT\([[:space:]]*([^,)]+,)[[:space:]]*([^)]+)[[:space:]]*\)/BU_GET(\1 struct \2)/g
|
||||
BU_GETSTRUCT(ptr, struct_type) changed to BU_GET(ptr, struct struct_t) [7.21]
|
||||
s/BU_GETUNION\([[:space:]]*([^,)]+,)[[:space:]]*([^)]+)[[:space:]]*\)/BU_GET(\1 union \2)/g
|
||||
s/BU_GETTYPE\([[:space:]]*([^,)]+,)[[:space:]]*([^)]+)[[:space:]]*\)/BU_GET(\1 \2)/g
|
||||
BU_GETUNION() and BU_GETTYPE() macros changed to BU_GET() [7.21]
|
||||
s/CMD_NULL/BU_CMD_NULL/g
|
||||
s/CMDHIST/BU_CMDHIST/g
|
||||
prefix the cmd.h defines with BU_ since they are part of libbu [7.21]
|
||||
s/bu_shader_to_tcl_list/bu_shader_to_list/g
|
||||
renamed as it applies to any list in {} form, tcl or otherwise [7.21]
|
||||
s/bu_(add|delete|call)_hook/bu_hook_\1/g
|
||||
renamed hook functions to be consistent with other libbu API [7.21]
|
||||
s/bu_file_exists\(([^)]*)\)/bu_file_exists(\1, NULL)/g
|
||||
new file descriptor parameter added [7.21]
|
||||
s/bu_list_path\(([^,]*),([^,]*),[[:space:]]([^)]*)\)/bu_dir_list(\1,\2, &(\3))/g
|
||||
s/bu_count_path(.*)\);/bu_dir_list\1, NULL);/g
|
||||
made bu_dir_list() return the number of entries [7.21]
|
||||
s/bu_strcmpm\((.*),([^,]*)\)/bu_strcmp(\1)/g
|
||||
no use for label parameter, convert to bu_strcmp() [7.21]
|
||||
bu_set_realtime() [deprecated 7.22]
|
||||
|
||||
7.24
|
||||
----
|
||||
s/bu_set_realtime([[:space:]]);//g
|
||||
didn't do anything [7.23]
|
||||
s/.*bu_cpulimit_[sg]et([[:space:]]);//g
|
||||
didn't do anything [7.23]
|
||||
s/rt_g\./RTG\./g
|
||||
renamed rt_g global to RTG so it doesn't match the struct name [7.24]
|
||||
s/rt_functab\[/OBJ\[/g
|
||||
renamed rt_functab global to OBJ so it doesn't match the struct name [7.24]
|
||||
s/redraw_vlist/draw/g
|
||||
removed redraw_vlist mged command, just call draw or refresh [7.24]
|
||||
s/RT_BADNUM/INVALID/g
|
||||
s/RT_BADVAL/VINVALID/g
|
||||
moved RT_BADNUM and RT_BADVEC to vmath.h as INVALID and VINVALID [7.24]
|
||||
@@ -1,87 +0,0 @@
|
||||
= BRL-CAD Interface Change Policy
|
||||
:toc: macro
|
||||
|
||||
toc::[]
|
||||
|
||||
== Scope
|
||||
|
||||
This policy defines how BRL-CAD public interfaces may change. Public
|
||||
interfaces include developer APIs, command-line interfaces, graphical
|
||||
interfaces, documented commands, installed headers, public macros,
|
||||
public types, and other behavior users reasonably rely on.
|
||||
|
||||
Renaming an application is not minimally impacting: an application
|
||||
name is the primary way users find and run the tool.
|
||||
|
||||
Every public interface change must be either minimally impacting or
|
||||
formally deprecated.
|
||||
|
||||
== Minimally Impacting
|
||||
|
||||
A minimally impacting change may be made at any time. A change is
|
||||
minimally impacting only when it can be represented by the documented
|
||||
rule language in
|
||||
link:doc/changes/minimally-impacting.rules[doc/changes/minimally-impacting.rules]
|
||||
and emitted by the generated update script.
|
||||
|
||||
If the rule language cannot express a change, either extend the rule
|
||||
language so the generated script can perform the update, or treat the
|
||||
change as formally deprecated.
|
||||
|
||||
Minimally impacting path includes:
|
||||
|
||||
* recently introduced interfaces that have not yet appeared unchanged
|
||||
in two releases;
|
||||
* appreciably broken interfaces that have been unusable for at least
|
||||
two releases and have no secondary utility;
|
||||
* elementary mechanical changes such as renames, parameter reordering,
|
||||
parameter removal, defaulted parameter insertion, equivalent
|
||||
interface substitutions, and header moves.
|
||||
|
||||
For function argument rewrites, BRL-CAD assumes callers are not
|
||||
relying on preprocessor-generated call syntax and are not passing
|
||||
nested function calls as arguments to the changed function. That
|
||||
assumption keeps generated substitutions deterministic and reviewable.
|
||||
|
||||
Rule syntax and generated update-script workflow are documented in
|
||||
link:doc/changes/README.adoc[doc/changes/README.adoc]. The generated
|
||||
build-tree rendering of minimally impacting changes is
|
||||
`doc/changes/minimally-impacting.adoc`.
|
||||
|
||||
== Formally Deprecated
|
||||
|
||||
Any public interface change that is not minimally impacting must
|
||||
follow the formal deprecation process.
|
||||
|
||||
During a major release, such as 7.x to 8.x, any public interface may
|
||||
change without advance notice. Major version changes imply interface
|
||||
incompatibility.
|
||||
|
||||
During a minor release, such as 7.44.x to 7.46.x, a public interface
|
||||
must be deprecated beforehand with advance notice in at least two
|
||||
minor releases and at least 90 days elapsed since the initial release
|
||||
announcement.
|
||||
|
||||
Public interfaces scheduled for change should be listed in
|
||||
link:doc/changes/deprecated.adoc[doc/changes/deprecated.adoc] and
|
||||
visibly marked in the source code. Appropriate markings include
|
||||
`DEPRECATED` declarations, preprocessor warnings, `@DEPRECATED`
|
||||
comments, runtime warnings when they do not disrupt valid usage, and
|
||||
documentation updates.
|
||||
|
||||
After a deprecation window has completed, removed or significantly
|
||||
changed interfaces are listed in
|
||||
link:doc/changes/obsoleted.adoc[doc/changes/obsoleted.adoc].
|
||||
|
||||
== Examples
|
||||
|
||||
Removing `rt_shootray()` after it has been published and documented in
|
||||
multiple releases is not minimally impacting unless a generated rule
|
||||
can update callers to an equivalent interface. Otherwise, it must be
|
||||
listed as deprecated, marked in the headers, announced in releases,
|
||||
and only later obsoleted.
|
||||
|
||||
Renaming `bu_log()` or adding a defaulted first argument can be
|
||||
minimally impacting if the change is listed in
|
||||
`minimally-impacting.rules` and the generated update script rewrites
|
||||
existing callers.
|
||||
+2112
-3089
File diff suppressed because it is too large
Load Diff
@@ -26,8 +26,8 @@ License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with this file. If you did not, please contact one of
|
||||
the BRL-CAD project administrators listed at the Github project
|
||||
site https://github.com/BRL-CAD/brlcad/ or listed in the AUTHORS file
|
||||
the BRL-CAD project administrators listed at the SourceForge project
|
||||
site http://sf.net/projects/brlcad/ or listed in the AUTHORS file
|
||||
included as part of the distribution.
|
||||
|
||||
Overview
|
||||
@@ -80,7 +80,10 @@ When referring to BRL-CAD, its source code, documentation, and
|
||||
libraries, the reference is not meant to include or imply 3rd party
|
||||
source code, libraries, and/or applications unless specifically stated
|
||||
otherwise. No endorsement or claim of authorship is implied to any
|
||||
3rd party asset that is included with BRL-CAD.
|
||||
3rd party asset that is included with BRL-CAD. The majority of the
|
||||
3rd party source code, libraries, and applications included with
|
||||
BRL-CAD are located in the src/other/ directory of the source code
|
||||
distribution.
|
||||
|
||||
Copyright
|
||||
---------
|
||||
@@ -98,7 +101,7 @@ arranged. This includes an implicit assignment of copyright for any
|
||||
and all contributions being made. The following notice should be
|
||||
prominent in the BRL-CAD sources:
|
||||
|
||||
Copyright (c) 1984-2026 United States Government as represented by
|
||||
Copyright (c) 1984-2013 United States Government as represented by
|
||||
the U.S. Army Research Laboratory.
|
||||
|
||||
Contact
|
||||
|
||||
@@ -1,28 +1,34 @@
|
||||
The Installation Guide to BRL-CAD
|
||||
=================================
|
||||
|
||||
This document covers the installing BRL-CAD from either a source or binary
|
||||
distribution. Please see REPORTING PROBLEMS to troubleshoot.
|
||||
Please read this document if you are interested in installing BRL-CAD.
|
||||
|
||||
Some platforms have additional platform-specific documentation provided in the
|
||||
doc/ directory with additional information. This presently includes the
|
||||
following:
|
||||
This document covers the basics of installing BRL-CAD from either a
|
||||
source or binary distribution. Please see the 'Reporting Problems'
|
||||
section if you run into any trouble installing BRL-CAD.
|
||||
|
||||
Some platforms have additional platform-specific documentation
|
||||
provided in the doc/ directory of the source distribution that should
|
||||
be consulted if that is the platform you are installing on. This
|
||||
presently includes the following:
|
||||
|
||||
doc/README.AIX -- IBM's Advanced Interactive eXecutive OS
|
||||
doc/README.BSD -- FreeBSD, NetBSD, OpenBSD, etc.
|
||||
doc/README.IRIX -- SGI IRIX and IRIX64
|
||||
doc/README.Linux -- Various Linux distributions
|
||||
doc/README.MacOSX -- Apple Mac OS X
|
||||
doc/README.Solaris -- Oracle Solaris, OpenIndiana (Illumos), etc.
|
||||
doc/README.Windows -- Microsoft Windows
|
||||
doc/README.VAX -- Virtual Address eXtension architecture from DEC.
|
||||
One of the original BRL-CAD platforms. These
|
||||
days, re-created using the simh simulator.
|
||||
doc/README.Windows -- Microsoft Windows
|
||||
|
||||
|
||||
TABLE OF CONTENTS
|
||||
-----------------
|
||||
Introduction
|
||||
Table of Contents
|
||||
Quick Source Install
|
||||
Quick Installation
|
||||
Installing from Binary
|
||||
Installing from Source
|
||||
Testing Functionality
|
||||
@@ -31,35 +37,53 @@ TABLE OF CONTENTS
|
||||
Configuration Options
|
||||
|
||||
|
||||
QUICK SOURCE INSTALL
|
||||
--------------------
|
||||
QUICK INSTALLATION
|
||||
------------------
|
||||
|
||||
See https://brlcad.org/wiki/Compiling for a platform-specific walk-through
|
||||
including instructions for building on Windows.
|
||||
Note that the downloaded files have two check sums calculated
|
||||
automatically by the Source Forge file release system. The values are
|
||||
used to verify the integrity of the files as distributed. Get those
|
||||
data by clicking on the 'i' button at the end of each file's name.
|
||||
You should ensure those data are retained and kept with the files if
|
||||
you re-distribute them.
|
||||
|
||||
Required tools:
|
||||
- Git must be 2.17 or later
|
||||
- CMake must be 3.26 or later
|
||||
- Compiler must be C++17-compliant
|
||||
- If using Visual Studio, version 2019 (16.8+) or later
|
||||
- If using GCC/G++, version 7 or later
|
||||
- If using LLVM/Clang 5 or later
|
||||
- If using Intel, version 19.0.1 or later
|
||||
|
||||
Steps to compile, test, and install an optimized BRL-CAD on non-Windows
|
||||
platforms:
|
||||
If you downloaded a binary distribution of BRL-CAD for your system,
|
||||
please read the INSTALLING FROM BINARY section of this document down
|
||||
below. The rest of this quick installation section is only relevant
|
||||
to source code distributions of BRL-CAD.
|
||||
|
||||
git clone https://github.com/BRL-CAD/brlcad.git
|
||||
mkdir brlcad/build
|
||||
cd brlcad/build
|
||||
cmake .. -DENABLE_ALL=ON -DCMAKE_BUILD_TYPE=Release
|
||||
make -j4
|
||||
make check
|
||||
sudo make install
|
||||
For the impatient or simplistic, the following steps should compile,
|
||||
test, and install an optimized BRL-CAD quickly into the /usr/brlcad/rel-X.Y.Z
|
||||
directory if CMake is installed on your system:
|
||||
|
||||
Once installed, run bin/mged or bin/archer to launch BRL-CAD's GUI apps. See
|
||||
POST-INSTALLATION for instruction adding bin/ folder to your system PATH to
|
||||
more easily run geometry converters.
|
||||
gunzip brlcad-X.Y.Z.tar.gz
|
||||
tar -xvf brlcad-X.Y.Z.tar
|
||||
mkdir brlcad-build
|
||||
cd brlcad-build
|
||||
cmake ../brlcad-X.Y.Z -DBRLCAD_BUNDLED_LIBS=ON -DCMAKE_BUILD_TYPE=Release
|
||||
make
|
||||
make benchmark
|
||||
make regress
|
||||
make install # as root, e.g. sudo make install
|
||||
|
||||
If any of the listed steps fail, then something unexpected happened.
|
||||
See the REPORTING PROBLEMS section of this document to report the
|
||||
problem or the INSTALLING FROM SOURCE section for more comprehensive
|
||||
instructions.
|
||||
|
||||
Once installed, add /usr/brlcad/rel-X.Y.Z/bin to your path, and you should be
|
||||
able to run any of the 400+ applications that constitute BRL-CAD. For
|
||||
example, to run the MGED solid modeler:
|
||||
|
||||
PATH=/usr/brlcad/rel-X.Y.Z/bin:$PATH ; export PATH
|
||||
mged
|
||||
|
||||
If you use tcsh or another C-shell based command shell, use this
|
||||
instead:
|
||||
|
||||
set path=( /usr/brlcad/rel-X.Y.Z/bin $path ) ; rehash
|
||||
mged
|
||||
|
||||
|
||||
INSTALLING FROM BINARY
|
||||
@@ -74,128 +98,93 @@ and Windows etc.
|
||||
|
||||
Generic Binary Distributions:
|
||||
|
||||
For binary distributions that are simply compressed tarballs of the
|
||||
installation root, they should contain the entire hierarchy of the
|
||||
distribution. To put that hierarchy in its "installed" location, you just
|
||||
create the directory and move the expanded tarball contents:
|
||||
For the unspecialized binary distributions that are basically
|
||||
compressed tarballs of the installation root, they should contain the
|
||||
entire hierarchy of the distribution. To put that hierarchy in its
|
||||
"installed" location, you just create the directory and move the
|
||||
expanded tarball contents:
|
||||
|
||||
gunzip BRL-CAD_X.Y.Z_Linux_ia64.tar.gz
|
||||
tar -xvf BRL-CAD_X.Y.Z_Linux_ia64.tar
|
||||
sudo mkdir /usr/brlcad/rel-X.Y.Z
|
||||
sudo mv BRL-CAD_X.Y.Z_Linux_ia64/* /usr/brlcad/rel-7.X.Y/
|
||||
gunzip BRL-CAD_7.2.4_Linux_ia64.tar.gz
|
||||
tar -xvf BRL-CAD_7.2.4_Linux_ia64.tar
|
||||
sudo mkdir /usr/brlcad/rel-7.2.4
|
||||
sudo mv BRL-CAD_7.2.4_Linux_ia64/* /usr/brlcad/rel-7.2.4/
|
||||
|
||||
Of course, there are other compression options possible including zip and
|
||||
bzip2. By default, BRL-CAD expects to be installed into /usr/brlcad/rel-X.Y.Z.
|
||||
On some platforms the binary may be relocatable, but this is not guaranteed.
|
||||
It's recommended that you start from a source distribution if you would like to
|
||||
install into an alternate installation location. That said, if you do desire
|
||||
to install and/or run BRL-CAD from a different location, give it a try...on
|
||||
some platforms it will work.
|
||||
Of course, there are other compression options possible including zip
|
||||
and bzip2. By default, BRL-CAD expects to be installed into
|
||||
/usr/brlcad/rel-7.2.4. On some platforms the binary may be relocatable,
|
||||
but this is not guaranteed. It's recommended that you start from a source
|
||||
distribution if you would like to install into an alternate installation
|
||||
location. That said, if you do desire to install and/or run BRL-CAD from
|
||||
a different location, give it a try...on some platforms it will work.
|
||||
|
||||
Something to be aware of, even if a binary distribution IS relocatable: it will
|
||||
use its local copies of things like libraries only so long as the "final"
|
||||
installed target directory that the build was compiled for does not contain a
|
||||
BRL-CAD installation. Due to the way path logic is set, an installed copy of a
|
||||
library in the correct location will always be loaded first, regardless of the
|
||||
presence of a "local" copy.
|
||||
Something to be aware of, even if a binary distribution IS relocatable:
|
||||
it will use its local copies of things like libraries only so long as the
|
||||
"final" installed target directory that the build was compiled for
|
||||
does not contain a BRL-CAD installation. Due to the way path logic
|
||||
is set, an installed copy of a library in the correct location will
|
||||
always be loaded first, regardless of the presence of a "local" copy.
|
||||
|
||||
|
||||
Mac OS X Disk Mounting Image:
|
||||
|
||||
Mount the .dmg and run the Installer .pkg contained therein. This will install
|
||||
into /usr/brlcad/rel-X.Y.Z and will only require confirming that your
|
||||
environment is set up properly (i.e. add /usr/brlcad/rel-X.Y.Z/bin to your
|
||||
Mount the .dmg and run the Installer .pkg contained therein. This
|
||||
will install into /usr/brlcad/rel-X.Y.Z and will only require confirming that
|
||||
your environment is set up properly (i.e. add /usr/brlcad/rel-X.Y.Z/bin to your
|
||||
path) as described in the Quick Installation section.
|
||||
|
||||
|
||||
Validating checksums:
|
||||
|
||||
The integrity of distributed files can be verified using checksums that are
|
||||
published with released files. Released files and their checksums are
|
||||
available from the GitHub releases page (https://github.com/BRL-CAD/brlcad/releases). If you
|
||||
re-distribute BRL-CAD, checksums should be retained with the files so others
|
||||
can validate origination.
|
||||
|
||||
|
||||
INSTALLING FROM SOURCE
|
||||
----------------------
|
||||
|
||||
There are a couple of ways to obtain the BRL-CAD sources, usually via one of
|
||||
the following starting points:
|
||||
There are a couple of ways to obtain the BRL-CAD sources, usually via
|
||||
one of the following starting points:
|
||||
|
||||
1) from a Git checkout, or
|
||||
1) from a SVN checkout/export, or
|
||||
2) from a source distribution tarball
|
||||
|
||||
Using the latest Git sources is recommended where possible since it
|
||||
will have the latest changes.
|
||||
Using the latest SVN sources is recommended where possible since it
|
||||
will have the latest changes. See the corresponding section below for
|
||||
details on how to install from either starting point.
|
||||
|
||||
|
||||
Starting From a SVN Checkout/Export:
|
||||
|
||||
With CMake, there is no longer any difference between building from
|
||||
a subversion checkout and a tarball--follow the Source Distribution
|
||||
instructions below.
|
||||
|
||||
Starting From a Source Distribution:
|
||||
|
||||
There are many different ways to build BRL-CAD and depending on what
|
||||
you need/want will determine which configuration options you should
|
||||
use. See the CONFIGURATION OPTIONS section below for details on how
|
||||
to go about selecting which options are appropriate for you.
|
||||
|
||||
BRL-CAD's dependencies are managed in a separate repository, located at
|
||||
https://github.com/BRL-CAD/bext By default BRL-CAD's configure process will
|
||||
download and manage the necessary dependencies, avoiding the need for user
|
||||
awareness of the bext repository, but there are a number of scenarios where it
|
||||
is advantageous for developers to adjust how this process works.
|
||||
|
||||
The full dependency stack of BRL-CAD, with all optional and experimental
|
||||
features enabled, is a VERY large and long compile. Therefore, the bext build
|
||||
outputs can be built as their own separate, external project to allow for reuse
|
||||
of the compiled outputs. Building bext separately means BRL-CAD won't get a
|
||||
chance to customize what is and is not built, but the trade-off is that outputs
|
||||
can be built once and reused over and over. Doing so can significantly shorten
|
||||
time spent configuring BRL-CAD builds - reusing bext compiled outputs is
|
||||
recommended for serious developers.
|
||||
|
||||
Various useful configurations for working with bext:
|
||||
|
||||
* Get a git clone that has everything which might be needed (large,
|
||||
but useful for offline building)
|
||||
|
||||
git clone --recurse-submodules https://github.com/BRL-CAD/brlcad
|
||||
|
||||
* Have prebuilt bext outputs to reuse - BRL-CAD will simply copy and prepare
|
||||
the pre-existing files
|
||||
|
||||
cmake .. -DBRLCAD_EXT_DIR=/home/user/bext_output
|
||||
|
||||
* Already have an existing bext clone but want BRL-CAD to build bext outputs
|
||||
|
||||
cmake .. -DBRLCAD_EXT_SOURCE_DIR=/home/user/bext
|
||||
|
||||
* Download, build and bundle only what is needed for librt
|
||||
|
||||
cmake .. -DBRLCAD_COMPONENTS=librt
|
||||
|
||||
* Build and bundle only what is needed, but don't require internet for bext clone
|
||||
cmake .. -DBRLCAD_EXT_SOURCE_DIR=/home/user/bext -DBRLCAD_COMPONENTS=librt
|
||||
|
||||
|
||||
By default, the build system will prepare a Debug build and install into the
|
||||
/usr/brlcad/dev-X.Y.Z directory. The CMAKE_INSTALL_PREFIX option may be used
|
||||
to change that directory, or a Release build type may be specified to install
|
||||
to /usr/brlcad/rel-X.Y.Z - more on this below. The tradition of non-system
|
||||
installation paths goes back a couple of decades and is a convenient means to
|
||||
isolate the BRL-CAD solid modeling system from your system, resolves conflicts,
|
||||
facilitates uninstalls, and simplifies upgrades. The default configuration is
|
||||
performed by running `cmake'. It is not required to do the build in a
|
||||
directory different from your source directory, but it is much cleaner and
|
||||
*highly* recommended - this guide will illustrate the build process with the
|
||||
assumption that the BRL-CAD source code is in the directory brlcad-X.Y.Z and
|
||||
the directory intended to hold the build output is brlcad-build, located in the
|
||||
same parent directory as brlcad-X.Y.Z:
|
||||
By default, the default configuration will prepare the build system
|
||||
to perform a Debug build and install into the /usr/brlcad/dev-X.Y.Z
|
||||
directory. The CMAKE_INSTALL_PREFIX option may be used to change
|
||||
that directory, or a Release build type may be specified to install to
|
||||
/usr/brlcad/rel-X.Y.Z - more on this below. The
|
||||
tradition of non-system installation paths goes back a couple of decades
|
||||
and is a convenient means to isolate the BRL-CAD solid modeling
|
||||
system from your system, resolves conflicts, facilitates uninstalls,
|
||||
and simplifies upgrades. The default configuration is performed by
|
||||
running `cmake'. It is not required to do the build in a directory
|
||||
different from your source directory, but it is much cleaner and
|
||||
*highly* recommended - this guide will illustrate the build process
|
||||
with the assumption that the BRL-CAD source code is in the directory
|
||||
brlcad-7.2.4 and the directory intended to hold the build output is
|
||||
brlcad-build, located in the same parent directory as brlcad-7.2.4:
|
||||
|
||||
.
|
||||
./brlcad-X.Y.Z
|
||||
./brlcad-7.2.4
|
||||
./brlcad-build
|
||||
|
||||
To start the build process, cd into brlcad-build and run CMake,
|
||||
pointing it to the source directory:
|
||||
|
||||
cd brlcad-build
|
||||
cmake ../brlcad-X.Y.Z
|
||||
cmake ../brlcad-7.2.4
|
||||
|
||||
As mentioned earlier, CMake uses two "build types", controlled by
|
||||
the CMAKE_BUILD_TYPE variable, that are useful for specific purposes:
|
||||
@@ -220,14 +209,35 @@ override the ../brlcad-install default. Build types are a convenient way
|
||||
to bundle sets of settings, but they do not prevent overrides if a more
|
||||
custom setup is needed.
|
||||
|
||||
By default, all components and functionality will be built.
|
||||
Note that BRL-CAD does require and include several 3rd party
|
||||
components. If your system does not include a sufficient version of
|
||||
those required 3rd party components, they will be automatically
|
||||
configured for compilation.
|
||||
|
||||
If the autodetection mechanisms fail to produce a working configuration,
|
||||
the next simplest approach is typically to enable ALL the third party
|
||||
components - this is typically a well tested configuration, but will
|
||||
increase both the build time and final install size of BRL-CAD on
|
||||
the system. To set this variable on the command line, use -D to
|
||||
define ENABLE_ALL for CMake:
|
||||
define BRLCAD_BUNDLED_LIBS for CMake:
|
||||
|
||||
-DENABLE_ALL=ON
|
||||
-DBRLCAD_BUNDLED_LIBS=Bundled
|
||||
|
||||
If the graphical interface (cmake-gui) is in use, it will list this
|
||||
and other common options by default, allowing the user change them
|
||||
graphically. This is often quicker and more convenient than
|
||||
defining options on the command line, but both will work.
|
||||
|
||||
You can also force on or off any individual 3rd party library by
|
||||
setting the BRL-CAD variable for that feature to either on or off:
|
||||
|
||||
-DBRLCAD_<LIBRARY>=ON
|
||||
|
||||
Other variables control BRL-CAD features. For example, to NOT
|
||||
enable functionality using OpenGL, set
|
||||
|
||||
-DBRLCAD_ENABLE_OPENGL=OFF
|
||||
|
||||
To obtain an optimized build (for example, for BRL-CAD Benchmark
|
||||
performance evaluation), enable BRLCAD_FLAGS_OPTIMIZATION:
|
||||
@@ -237,6 +247,23 @@ performance evaluation), enable BRLCAD_FLAGS_OPTIMIZATION:
|
||||
See the CONFIGURATION OPTIONS below for more details on all of the
|
||||
possible settings.
|
||||
|
||||
You can specify options or preferences you want to always use by
|
||||
default. For example, to always enable all local libs the following
|
||||
line can be added to your own configuration file:
|
||||
|
||||
set(BRLCAD_BUNDLED_LIBS "Bundled" CACHE STRING "Enable all local libs")
|
||||
|
||||
You can define your own configuration file in one of three ways. The
|
||||
build system will search for the file in this order:
|
||||
|
||||
${BRLCAD_SOURCE_DIR}/../BRL-CAD_CONFIG.GLOBAL
|
||||
|
||||
${BRLCAD_SOURCE_DIR}/BRL-CAD_CONFIG.GLOBAL
|
||||
|
||||
the file defined in the environment variable "BRLCAD_USER_GLOBAL_CONFIG_FILE"
|
||||
|
||||
The build system will use the first file defined that exists.
|
||||
|
||||
Once configured, you should be able to successfully build BRL-CAD via
|
||||
make:
|
||||
|
||||
@@ -262,31 +289,19 @@ or on operating systems set up to use sudo:
|
||||
TESTING FUNCTIONALITY
|
||||
---------------------
|
||||
|
||||
The primary build target to validate a compilation of BRL-CAD is:
|
||||
|
||||
make check
|
||||
|
||||
That runs a trio of test sets including "benchmark", "regress", and
|
||||
"unit". The first set is a performance test that also validates
|
||||
whether ray tracing behavior is correct:
|
||||
To test BRL-CAD before installation, you can run the BRL-CAD benchmark.
|
||||
The benchmark will report if the results are correct, testing a
|
||||
majority of the core functionality of BRL-CAD in addition to testing
|
||||
your system's performance:
|
||||
|
||||
make benchmark
|
||||
|
||||
The second test set is our regression tests that run a host of
|
||||
rigorous integration tests and validate essential behavior:
|
||||
Note that the benchmark target will build ONLY the pieces required for
|
||||
the benchmark tests, unless a general make has already been performed.
|
||||
For more testing, you can run the regression test suite:
|
||||
|
||||
make regress
|
||||
|
||||
The third set runs unit tests that validate low-level behavior in
|
||||
BRL-CAD's core libraries:
|
||||
|
||||
make unit
|
||||
|
||||
Last but not least, one may simply run all available tests, though
|
||||
note that some tests will intentionally fail:
|
||||
|
||||
make test
|
||||
|
||||
|
||||
POST-INSTALLATION
|
||||
-----------------
|
||||
@@ -310,35 +325,38 @@ files.
|
||||
System PATH:
|
||||
|
||||
Normally, BRL-CAD's install directories are not in system PATH lists and
|
||||
consequently BRL-CAD's executables will not be invocable without specifying
|
||||
consequently BRL-CAD's executables will not be invokable without specifying
|
||||
their full path. This is normally handled in Unix environments by adding
|
||||
the desired BRL-CAD installation's binary directory to the user's local path:
|
||||
|
||||
On Windows, the PATH system variable can be set using System Utility
|
||||
in control panel. Add the bin/ folder in the install directory to PATH.
|
||||
|
||||
On Linux/BSD/other systems:
|
||||
In the bash shell: export PATH=/usr/brlcad/rel-X.Y.Z:$PATH
|
||||
In the csh shell: setenv PATH /usr/brlcad/rel-X.Y.Z:$PATH
|
||||
|
||||
In the bash shell: export PATH=/usr/brlcad/rel-X.Y.Z:$PATH
|
||||
In the csh shell: setenv PATH /usr/brlcad/rel-X.Y.Z:$PATH
|
||||
|
||||
REPORTING PROBLEMS
|
||||
------------------
|
||||
|
||||
Please report any bugs, support requests, or feature requests to:
|
||||
https://github.com/BRL-CAD/brlcad/issues
|
||||
Please report any bugs encountered to the project bug tracker at
|
||||
http://sourceforge.net/tracker/?group_id=105292&atid=640802
|
||||
|
||||
Similarly, please post any request for feature enhancements or support
|
||||
to http://sourceforge.net/tracker/?group_id=105292&atid=640805 and
|
||||
http://sourceforge.net/tracker/?group_id=105292&atid=640803
|
||||
respectively.
|
||||
|
||||
|
||||
CONFIGURATION OPTIONS
|
||||
---------------------
|
||||
|
||||
--- ENABLE_ALL ---
|
||||
--- BRLCAD_BUNDLED_LIBS ---
|
||||
|
||||
If set to ON, and the BRL-CAD configure process is managing the bext
|
||||
dependencies, instructs bext to default to building local copies of the
|
||||
dependencies it will enable per the BRL-CAD feature settings, rather than
|
||||
searching for system versions.
|
||||
Enables compilation of all 3rd party sources that are provided within a BRL-CAD
|
||||
source distribution. If used this option sets all other 3rd party library
|
||||
build flags to ON by default. However, that setting can be overridden by
|
||||
manually setting individual variables. Default is "AUTO" - 3rd party sources
|
||||
are compiled only if they are not detected as being available and functioning
|
||||
as expected.
|
||||
|
||||
Aliases: ENABLE_ALL
|
||||
|
||||
|
||||
--- BRLCAD_ENABLE_OPENGL ---
|
||||
@@ -350,41 +368,6 @@ if it is, default is to enable.
|
||||
Aliases: ENABLE_OPENGL
|
||||
|
||||
|
||||
--- BRLCAD_X11_PROVIDER ---
|
||||
|
||||
Selects the X11 implementation used by BRL-CAD, Tk, Qt, and OpenGL. Accepted
|
||||
values are AUTO, SYSTEM, and XMIN. AUTO is the default and deliberately
|
||||
resolves to SYSTEM so installing Xmin cannot change an existing build.
|
||||
|
||||
XMIN selects an installed Xmin client SDK for deterministic GUI testing
|
||||
without a host X server. The SDK must provide Xmin::ToolkitX11; OpenGL builds
|
||||
also need Xmin::GL. Set Xmin_ROOT to the SDK installation prefix. Tk and Qt
|
||||
must be built for the same provider because their public X11 APIs conceal
|
||||
provider-private state; mixing Xmin and system client libraries is not ABI
|
||||
safe and is rejected during configuration.
|
||||
|
||||
When BRL-CAD manages bext, it derives the matching bext SDK prefix from the
|
||||
selected Xmin package. Bext then applies its version-matched Tk and Qt patches
|
||||
automatically to whichever bundled toolkits are selected. No external patch
|
||||
paths are needed.
|
||||
|
||||
A typical Xmin configuration is:
|
||||
|
||||
cmake .. -DBRLCAD_X11_PROVIDER=XMIN \
|
||||
-DXmin_ROOT=/path/to/xmin-prefix
|
||||
|
||||
Bext retains advanced TK_EXTRA_PATCHES, TK_CONFIGURE_ARGS, QT_EXTRA_PATCHES,
|
||||
and QT_XMIN_ROOT controls for custom profiles. The standard BRL-CAD Xmin
|
||||
configuration does not need them. Refer to bext's Xmin profile documentation
|
||||
before changing the bundled Tk or Qt revision.
|
||||
|
||||
|
||||
--- BRLCAD_COMPONENTS ---
|
||||
|
||||
Semicolon separated list of components to enable for building - see
|
||||
src/source_dirs.cmake for a list of the components that may be specified.
|
||||
|
||||
|
||||
--- BRLCAD_ENABLE_RUNTIME_DEBUG ---
|
||||
|
||||
Enables support for application and library debugging facilities.
|
||||
@@ -398,51 +381,18 @@ Aliases: ENABLE_RUNTIME_DEBUG, ENABLE_RUN_TIME_DEBUG, ENABLE_RUNTIME_DEBUGGING
|
||||
ENABLE_RUN_TIME_DEBUGGING
|
||||
|
||||
|
||||
--- BRLCAD_EXT_DIR ---
|
||||
|
||||
If specified, BRL-CAD will look in this directory for bext compiled outputs to
|
||||
bundle and use during the build.
|
||||
|
||||
|
||||
--- BRLCAD_EXT_SOURCE_DIR ---
|
||||
|
||||
If specified, BRL-CAD will look in this directory for bext source files. Use
|
||||
this when you have a pre-existing bext clone and don't want BRL-CAD's configure
|
||||
process to pull down another copy, but are still looking to have the BRL-CAD
|
||||
configure process manage producing bext build outputs.
|
||||
|
||||
|
||||
--- BRLCAD_EXT_PARALLEL ---
|
||||
|
||||
This number, when specified, describes how many compilation threads to use
|
||||
when compiling bext sources. Default is 8.
|
||||
|
||||
|
||||
--- BRLCAD_DEBUGGING ---
|
||||
--- BRLCAD_FLAGS_DEBUG ---
|
||||
|
||||
Add compiler flags to aid in program debugging. Defaults to ON.
|
||||
|
||||
Aliases: ENABLE_DEBUG, ENABLE_FLAGS_DEBUG, ENABLE_DEBUG_FLAGS
|
||||
BRLCAD_FLAGS_DEBUG
|
||||
|
||||
|
||||
--- BRLCAD_PGO ---
|
||||
--- BRLCAD_ENABLE_COMPILER_WARNINGS ---
|
||||
|
||||
Enable profile-guided optimization build flags. Defaults to OFF.
|
||||
|
||||
Profile-guided optimization builds are possible via two-pass
|
||||
compilation. Compile with this flag set, run the benchmark suite,
|
||||
clean the build, and then compile again with this flag set. Supported
|
||||
compilers will utilize data from the first pass to guide optimization,
|
||||
typically resulting in a significant performance increase:
|
||||
|
||||
|
||||
--- BRLCAD_WARNINGS ---
|
||||
|
||||
Use extra warning flags when compiling C/C++ code. Defaults to ON.
|
||||
Use extra compiler warning flags when compiling C/C++ code. Defaults to ON.
|
||||
|
||||
Aliases: ENABLE_WARNINGS, ENABLE_COMPILER_WARNINGS
|
||||
BRLCAD_ENABLE_COMPILER_WARNINGS
|
||||
|
||||
|
||||
--- BRLCAD_ENABLE_STRICT ---
|
||||
@@ -455,22 +405,298 @@ mode.
|
||||
Aliases: ENABLE_STRICT, ENABLE_STRICT_COMPILE, ENABLE_STRICT_COMPILE_FLAGS
|
||||
|
||||
|
||||
--- ENABLE_ALL_CXX_COMPILE ---
|
||||
--- ENABLE_POSIX_COMPLIANCE ---
|
||||
|
||||
Build all C and C++ files with a C++ compiler. Defaults to OFF.
|
||||
Build with strict POSIX compliance checking. Defaults to OFF.
|
||||
|
||||
EXPERIMENTAL!
|
||||
Causes compiler options to be set for strict compliance with the
|
||||
minimum C and C++ standards acceptable according to current BRL-CAD
|
||||
policy. The current minimum C standard is POSIX 200112 plus C99.
|
||||
There is no currently defined minimum C++ standard.
|
||||
|
||||
Aliases: ENABLE_ALL_CXX
|
||||
Aliases: ENABLE_POSIX
|
||||
|
||||
|
||||
--- ENABLE_C99_COMPLIANCE ---
|
||||
|
||||
Build with strict C99 compliance checking. Defaults to OFF.
|
||||
|
||||
Causes C compiler options to be set for strict compliance with the C99
|
||||
standard.
|
||||
|
||||
Aliases: ENABLE_C99
|
||||
|
||||
|
||||
--- BRLCAD_EXTRADOCS ---
|
||||
|
||||
The core option that enables and disables building of BRL-CAD's
|
||||
AsciiDoc based documentation (includes manuals and man pages for
|
||||
commands, among other things). It is built with BRL-CAD's bundled
|
||||
asciiquack processor into HTML and man-page (troff) formats. Defaults
|
||||
to ON for a full build and OFF for reduced target sets.
|
||||
The core option that enables and disables building of BRL-CAD's DocBook
|
||||
based documentation (includes manuals and man pages for commands, among
|
||||
other things.) Defaults to ON, but only HTML and MAN formats are enabled
|
||||
by default - PDF must be enabled separately by use of this option or one
|
||||
of its aliases. Note that you may set environment variable APACHE_FOP
|
||||
to point to your locally installed fop executable file (which on Linux is
|
||||
usually a shell script with 0755 permissions).
|
||||
|
||||
Aliases: ENABLE_DOCS, ENABLE_EXTRA_DOCS
|
||||
Aliases: ENABLE_DOCS, ENABLE_EXTRA_DOCS, ENABLE_DOCBOOK
|
||||
|
||||
|
||||
--- BRLCAD_REGEX ---
|
||||
|
||||
Option for enabling and disabling compilation of the Regular
|
||||
Expression Library provided with BRL-CAD's source distribution.
|
||||
Default is AUTO, responsive to the toplevel BRLCAD_BUNDLED_LIBS option
|
||||
and testing first for a system version if BRLCAD_BUNDLED_LIBS is also
|
||||
AUTO.
|
||||
|
||||
Aliases: ENABLE_REGEX
|
||||
|
||||
|
||||
--- BRLCAD_ZLIB ---
|
||||
|
||||
Option for enabling and disabling compilation of the zlib library
|
||||
provided with BRL-CAD's source distribution. Default is AUTO,
|
||||
responsive to the toplevel BRLCAD_BUNDLED_LIBS option and testing
|
||||
first for a system version if BRLCAD_BUNDLED_LIBS is also AUTO.
|
||||
|
||||
Aliases: ENABLE_ZLIB, ENABLE_LIBZ
|
||||
|
||||
|
||||
--- BRLCAD_LEMON ---
|
||||
|
||||
Option for enabling and disabling compilation of the lemon parser
|
||||
provided with BRL-CAD's source distribution. Default is AUTO,
|
||||
responsive to the toplevel BRLCAD_BUNDLED_LIBS option and testing
|
||||
first for a system version if BRLCAD_BUNDLED_LIBS is also AUTO.
|
||||
|
||||
Aliases: ENABLE_LEMON
|
||||
|
||||
|
||||
--- BRLCAD_RE2C ---
|
||||
|
||||
Option for enabling and disabling compilation of the re2c scanner
|
||||
utility provided with BRL-CAD's source distribution. Default is AUTO,
|
||||
responsive to the toplevel BRLCAD_BUNDLED_LIBS option and testing
|
||||
first for a system version if BRLCAD_BUNDLED_LIBS is also AUTO.
|
||||
|
||||
Aliases: ENABLE_RE2C
|
||||
|
||||
|
||||
--- BRLCAD_PERPLEX ---
|
||||
|
||||
Option for enabling and disabling compilation of the perplex scanner
|
||||
generator provided with BRL-CAD's source distribution. Default is
|
||||
AUTO, responsive to the toplevel BRLCAD_BUNDLED_LIBS option and
|
||||
testing first for a system version if BRLCAD_BUNDLED_LIBS is also
|
||||
AUTO. perplex requires a working re2c.
|
||||
|
||||
Aliases: ENABLE_PERPLEX
|
||||
|
||||
|
||||
--- BRLCAD_XSLTPROC ---
|
||||
|
||||
Option for enabling and disabling compilation of the xsltproc XML
|
||||
transformation utility provided with BRL-CAD's source distribution.
|
||||
Used for DocBook documentation processing. Default is AUTO,
|
||||
responsive to the toplevel BRLCAD_BUNDLED_LIBS option and testing
|
||||
first for a system version if BRLCAD_BUNDLED_LIBS is also AUTO.
|
||||
Depends on BRLCAD_EXTRADOCS.
|
||||
|
||||
Aliases: ENABLE_XSLTPROC
|
||||
|
||||
|
||||
--- BRLCAD_XMLLINT ---
|
||||
|
||||
Option for enabling and disabling compilation of the xmllint XML
|
||||
validation utility provided with BRL-CAD's source distribution. Used
|
||||
for DocBook documentation validation. Default is AUTO, responsive to
|
||||
the toplevel BRLCAD_BUNDLED_LIBS option and testing first for a system
|
||||
version if BRLCAD_BUNDLED_LIBS is also AUTO.
|
||||
|
||||
Aliases: ENABLE_XMLLINT
|
||||
|
||||
|
||||
--- BRLCAD_TERMLIB ---
|
||||
|
||||
Option for enabling and disabling compilation of the termlib library
|
||||
provided with BRL-CAD's source distribution. Default is AUTO,
|
||||
responsive to the toplevel BRLCAD_BUNDLED_LIBS option and testing
|
||||
first for a system version if BRLCAD_BUNDLED_LIBS is also
|
||||
AUTO. (Except when building with Visual Studio, where it is
|
||||
disabled. Windows does not support the termlib API.)
|
||||
|
||||
Aliases: ENABLE_TERMLIB
|
||||
|
||||
|
||||
--- BRLCAD_PNG ---
|
||||
|
||||
Option for enabling and disabling compilation of the Portable Network
|
||||
Graphics library provided with BRL-CAD's source distribution. Default
|
||||
is AUTO, responsive to the toplevel BRLCAD_BUNDLED_LIBS option and
|
||||
testing first for a system version if BRLCAD_BUNDLED_LIBS is also
|
||||
AUTO.
|
||||
|
||||
Aliases: ENABLE_PNG
|
||||
|
||||
|
||||
--- BRLCAD_UTAHRLE ---
|
||||
|
||||
Option for enabling and disabling compilation of the Utah Raster
|
||||
Toolkit library provided with BRL-CAD's source code. Default is AUTO,
|
||||
responsive to the toplevel BRLCAD_BUNDLED_LIBS option and testing
|
||||
first for a system version if BRLCAD_BUNDLED_LIBS is also AUTO.
|
||||
|
||||
Aliases: ENABLE_UTAHRLE
|
||||
|
||||
|
||||
--- BRLCAD_TCL ---
|
||||
|
||||
Option for enabling and disabling compilation of the Tcl library
|
||||
provided with BRL-CAD's source code. Default is AUTO, responsive to
|
||||
the toplevel BRLCAD_BUNDLED_LIBS option and testing first for a system
|
||||
version if BRLCAD_BUNDLED_LIBS is also AUTO.
|
||||
|
||||
Aliases: ENABLE_TCL
|
||||
|
||||
|
||||
--- BRLCAD_TK ---
|
||||
|
||||
Option for enabling and disabling compilation of the Tk library
|
||||
provided with BRL-CAD's source code. Default is AUTO, responsive to
|
||||
the BRLCAD_TCL option and testing first for a system version if
|
||||
BRLCAD_BUNDLED_LIBS is also AUTO. Option for enabling and disabling
|
||||
compilation of the Tk graphics package for Tcl provided with BRL-CAD's
|
||||
source distribution. Default is AUTO, auto-enabling if the BRLCAD_TCL
|
||||
option is set to BUNDLED and testing first for a system version if
|
||||
BRLCAD_TCL is set to AUTO or SYSTEM. If BRLCAD_TK is set to BUNDLED,
|
||||
local copy is built even if a system version is present. This option
|
||||
also depends on BRLCAD_ENABLE_TK being ON.
|
||||
|
||||
Aliases: ENABLE_TK
|
||||
|
||||
|
||||
--- BRLCAD_ITCL ---
|
||||
|
||||
Option for enabling and disabling compilation of the IncrTcl package
|
||||
for Tcl objects provided with BRL-CAD's source distribution. Default
|
||||
is AUTO, auto-enabling if the BRLCAD_TCL option is set to BUNDLED and
|
||||
testing first for a system version if BRLCAD_TCL is set to AUTO or
|
||||
SYSTEM. If BRLCAD_ITCL is set to BUNDLED, local copy is built even if
|
||||
a system version is present.
|
||||
|
||||
Aliases: ENABLE_ITCL
|
||||
|
||||
|
||||
--- BRLCAD_ITK ---
|
||||
|
||||
Option for enabling and disabling compilation of the IncrTcl itk
|
||||
package for Tk objects provided with BRL-CAD's source distribution.
|
||||
Default is AUTO, auto-enabling if the BRLCAD_TCL option is set to
|
||||
BUNDLED and testing first for a system version if BRLCAD_TCL is set to
|
||||
AUTO or SYSTEM. If BRLCAD_ITK is set to BUNDLED, local copy is built
|
||||
even if a system version is present. This package will be disabled if
|
||||
BRLCAD_ENABLE_TK is OFF.
|
||||
|
||||
Aliases: ENABLE_ITK
|
||||
|
||||
|
||||
--- BRLCAD_IWIDGETS ---
|
||||
|
||||
Option for enabling and disabling compilation of the IWidgets Tk
|
||||
widget package provided with BRL-CAD's source distribution. Default
|
||||
is AUTO, auto-enabling if the BRLCAD_TCL option is set to BUNDLED and
|
||||
testing first for a system version if BRLCAD_TCL is set to AUTO or
|
||||
SYSTEM. If BRLCAD_IWIDGETS is set to BUNDLED, local copy is built even if
|
||||
a system version is present. This package will be disabled if
|
||||
BRLCAD_ENABLE_TK is OFF.
|
||||
|
||||
Aliases: ENABLE_IWIDGETS
|
||||
|
||||
|
||||
--- BRLCAD_TKHTML ---
|
||||
|
||||
Option for enabling and disabling compilation of the Tkhtml HTML
|
||||
viewing package provided with BRL-CAD's source distribution. Default
|
||||
is AUTO, auto-enabling if the BRLCAD_TCL option is set to BUNDLED and
|
||||
testing first for a system version if BRLCAD_TCL is set to AUTO or
|
||||
SYSTEM. If BRLCAD_TKHTML is set to BUNDLED, local copy is built even if
|
||||
a system version is present. This package will be disabled if
|
||||
BRLCAD_ENABLE_TK is OFF.
|
||||
|
||||
Aliases: ENABLE_TKHTML
|
||||
|
||||
|
||||
--- BRLCAD_TKPNG ---
|
||||
|
||||
Option for enabling and disabling compilation of the tkpng PNG image
|
||||
viewing package provided with BRL-CAD's source distribution. Default
|
||||
is AUTO, auto-enabling if the BRLCAD_TCL option is set to BUNDLED and
|
||||
testing first for a system version if BRLCAD_TCL is set to AUTO or
|
||||
SYSTEM. If BRLCAD_TKPNG is set to BUNDLED, local copy is built even if
|
||||
a system version is present. This package will be disabled if
|
||||
BRLCAD_ENABLE_TK is OFF.
|
||||
|
||||
Aliases: ENABLE_TKPNG
|
||||
|
||||
|
||||
--- BRLCAD_TKTABLE ---
|
||||
|
||||
Option for enabling and disabling compilation of the Tktable graphical
|
||||
table widget package provided with BRL-CAD's source distribution.
|
||||
Default is AUTO, auto-enabling if the BRLCAD_TCL option is set to
|
||||
BUNDLED and testing first for a system version if BRLCAD_TCL is set to
|
||||
AUTO or SYSTEM. If BRLCAD_TKTABLE is set to BUNDLED, local copy is built
|
||||
even if a system version is present. This package will be disabled if
|
||||
BRLCAD_ENABLE_TK is OFF.
|
||||
|
||||
Aliases: ENABLE_TKTABLE
|
||||
|
||||
|
||||
--- BRLCAD_OPENNURBS ---
|
||||
|
||||
Option for enabling and disabling compilation of the openNURBS library
|
||||
provided with BRL-CAD's source code. Default is AUTO, responsive to
|
||||
the toplevel BRLCAD_BUNDLED_LIBS option and testing first for a system
|
||||
version if BRLCAD_BUNDLED_LIBS is also AUTO.
|
||||
|
||||
Aliases: ENABLE_OPENNURBS
|
||||
|
||||
|
||||
--- BRLCAD_SCL ---
|
||||
|
||||
Option for enabling and disabling compilation of the NIST Step Class
|
||||
Libraries provided with BRL-CAD's source code. Default is AUTO,
|
||||
responsive to the toplevel BRLCAD_BUNDLED_LIBS option and testing
|
||||
first for a system version if BRLCAD_BUNDLED_LIBS is also AUTO.
|
||||
|
||||
Aliases: ENABLE_SCL, ENABLE_STEP, ENABLE_STEP_CLASS_LIBRARIES
|
||||
|
||||
|
||||
--- BRLCAD_LIBVDS ---
|
||||
|
||||
Option for enabling and disabling compilation of the libvds triangle
|
||||
simplification library provided with BRL-CAD's source code. Default
|
||||
is AUTO, responsive to the toplevel BRLCAD_BUNDLED_LIBS option and
|
||||
testing first for a system version if BRLCAD_BUNDLED_LIBS is also
|
||||
AUTO.
|
||||
|
||||
Aliases: ENABLE_VDS
|
||||
|
||||
|
||||
--- BRLCAD_LIBGDIAM ---
|
||||
|
||||
Option for enabling and disabling compilation of the libgdiam approximate
|
||||
tight bounding box library provided with BRL-CAD's source code. Default
|
||||
is AUTO, responsive to the toplevel BRLCAD_BUNDLED_LIBS option and
|
||||
testing first for a system version if BRLCAD_BUNDLED_LIBS is also
|
||||
AUTO.
|
||||
|
||||
Aliases: ENABLE_GDIAM
|
||||
|
||||
|
||||
|
||||
*** Note - Do not add or edit configuration option descriptions and alias
|
||||
lists in this file - those entries are auto-generated from information in
|
||||
the toplevel CMakeLists.txt file and src/other/CMakeLists.txt - any changes
|
||||
should be made in those files. The CMake configuration process will
|
||||
automatically re-generate INSTALL with the new descriptions and alias
|
||||
information.
|
||||
|
||||
-3677
File diff suppressed because it is too large
Load Diff
@@ -1,14 +1,18 @@
|
||||
BRL-CAD
|
||||
Release 7.46.0
|
||||
http://brlcad.org/
|
||||
BRL-CAD
|
||||
Release 7.24.2
|
||||
http://brlcad.org/
|
||||
|
||||
BRL-CAD is a powerful cross-platform open source combinatorial
|
||||
solid modeling system that includes an interactive 3D solid geometry
|
||||
editor, a network-distributed symmetric multiprocessing (SMP)
|
||||
high-performance ray-tracer with support for rendering and geometric
|
||||
analysis, image and signal-processing tools, a system performance
|
||||
analysis benchmark suite, a flexible geometry scripting interface,
|
||||
and a high-performance geometric representation and analysis library.
|
||||
Constructive Solid Geometry (CSG) solid modeling system that includes
|
||||
an interactive 3D solid geometry editor, a network-distributed
|
||||
symmetric multiprocessing high-performance ray-tracer,
|
||||
network-distributed framebuffer support, image and signal-processing
|
||||
tools, ray-tracing support for rendering and geometric analysis,
|
||||
path-tracing and photon mapping support for realistic image synthesis,
|
||||
animation capabilities, ray-tracing and numerical processing
|
||||
libraries, a system performance analysis benchmark suite, an embedded
|
||||
scripting interface, and a robust high-performance geometric
|
||||
representation and analysis library.
|
||||
|
||||
|
||||
TABLE OF CONTENTS
|
||||
@@ -22,10 +26,12 @@ TABLE OF CONTENTS
|
||||
Bug Reports/Feature Requests
|
||||
Distribution Details
|
||||
Background Information
|
||||
Future Events
|
||||
Getting Help
|
||||
|
||||
|
||||
GETTING STARTED
|
||||
---------------
|
||||
----------------
|
||||
|
||||
This README file exists only to provide you a brief roadmap to the
|
||||
contents of the BRL-CAD distribution.
|
||||
@@ -33,44 +39,73 @@ contents of the BRL-CAD distribution.
|
||||
Some platforms have additional platform-specific documentation that
|
||||
should be consulted after reading this file:
|
||||
|
||||
doc/README.Windows -- Microsoft Windows
|
||||
doc/README.MacOSX -- Apple Mac OS X
|
||||
doc/README.AIX -- IBM's Advanced Interactive eXecutive OS
|
||||
doc/README.BSD -- FreeBSD, NetBSD, OpenBSD, etc.
|
||||
doc/README.IRIX -- SGI IRIX and IRIX64
|
||||
doc/README.Linux -- Various Linux distributions
|
||||
doc/README.* -- Other platforms, e.g., BSD, VAX
|
||||
doc/README.MacOSX -- Apple Mac OS X
|
||||
doc/README.Solaris -- Oracle Solaris, OpenIndiana (Illumos), etc.
|
||||
doc/README.Windows -- Microsoft Windows
|
||||
|
||||
Information on how to install and run the software, to get involved
|
||||
with development, or to run the performance benchmark test suite are
|
||||
covered in detail in separate standalone documents. For more details
|
||||
on what BRL-CAD provides, consult the main website.
|
||||
The information on how to install and operate the software, to become
|
||||
involved with the development of the package, or to run the benchmark
|
||||
performance test suite have each become sufficiently large that their
|
||||
details are covered in more detail in standalone documents. For more
|
||||
details on what BRL-CAD provides, see the documentation provided on
|
||||
the website at http://brlcad.org/.
|
||||
|
||||
Information relevant to the source code is contained in the HACKING
|
||||
(developer guide) and COPYING (legal overview) files.
|
||||
Information relevant to those interested in the source code is
|
||||
contained in the HACKING and COPYING files. See doc/benchmark.tr file
|
||||
for benchmark suite information. There is a variety of other
|
||||
documentation and information also available in the doc/ directory.
|
||||
|
||||
Note that only sample geometry models are included in public
|
||||
distributions of BRL-CAD. Detailed models are only available through
|
||||
official U.S. Gov't channels, e.g., via Advanced Joint Effectiveness
|
||||
Model (AJEM) support.
|
||||
Please note that this distribution package does not include the
|
||||
various military-specific model analysis tools such as MUVES, GIFT,
|
||||
SAR, SLAVE, VAST, etc., nor does it include any military geometry
|
||||
databases. If you desire to have access to this material, please
|
||||
contact one of the BRL-CAD developers.
|
||||
|
||||
|
||||
COMPILE AND INSTALL
|
||||
-------------------
|
||||
|
||||
In order to compile and install BRL-CAD from a source distribution,
|
||||
the latest CMake ( http://www.cmake.org ), a recent compiler, and at
|
||||
least 3GB of disk space are recommended. More details are available
|
||||
at https://brlcad.org/wiki/Compiling
|
||||
See the INSTALL file for details on configuring, compiling, and
|
||||
installing BRL-CAD. In order to compile and install BRL-CAD from a
|
||||
source distribution, the build tool CMake is required (minimum version
|
||||
currently required is 2.8.4) - see the website at http://www.cmake.org
|
||||
for source and binary installers. CMake is also available in many
|
||||
Linux and *BSD distributions.
|
||||
|
||||
Typically, the following steps should result in a successful install:
|
||||
Once CMake is installed, the following steps may be taken for a full
|
||||
default install (starting with a source tarball):
|
||||
|
||||
tar -xvzf brlcad-VERSION.tar.gz
|
||||
mkdir brlcad-VERSION/build
|
||||
cd brlcad-VERSION/build
|
||||
cmake .. -DBRLCAD_ENABLE_STRICT=OFF -DCMAKE_BUILD_TYPE=Release
|
||||
make -j4
|
||||
tar -xvzf brlcad-X.Y.Z.tar.gz
|
||||
mkdir brlcad-build
|
||||
cd brlcad-build
|
||||
cmake ../brlcad-X.Y.Z
|
||||
make
|
||||
make install
|
||||
|
||||
See the included INSTALL text file for explanation of the various
|
||||
cmake configuration options available for building BRL-CAD.
|
||||
where "X.Y.Z" is the version number of BRL-CAD. For those who prefer
|
||||
a curses interface, substitute ccmake for cmake above. If the graphical
|
||||
interface available from CMake is installed cmake-gui may be
|
||||
substituted for cmake. These interfaces will display the various
|
||||
configuration options available when building BRL-CAD, or the options
|
||||
may be set directly via command line -D options.
|
||||
The configure wrapper script may be substituted for cmake in the above
|
||||
steps for a more autotools-like configuration experience.
|
||||
|
||||
Users on multiprocessor systems will be able to speed up their builds
|
||||
by passing the -j option to make (e.g. make -j4, assuming GNU make).
|
||||
|
||||
Once the build completes and assuming you have proper filesystem
|
||||
permissions, you should be able to begin the installation by running
|
||||
the "make install" . By default, the package is configured to install
|
||||
entirely into /usr/brlcad/.
|
||||
|
||||
You will need to add /usr/brlcad/bin to your path (or whatever path the
|
||||
variable CMAKE_INSTALL_PREFIX was set to during configure) in order for
|
||||
the BRL-CAD binaries to be in your path.
|
||||
|
||||
|
||||
BENCHMARK
|
||||
@@ -97,38 +132,78 @@ comparing the results of the benchmark tests in more detail.
|
||||
COMMUNICATION
|
||||
-------------
|
||||
|
||||
There are various BRL-CAD mailing lists available including three
|
||||
You are invited to participate in the InterNet (aka "ARPANET")
|
||||
electronic mailing list on the BRL-CAD software. There are various
|
||||
BRL-CAD mailing lists available on the project website at
|
||||
http://sourceforge.net/mail/?group_id=105292 including three
|
||||
developer-oriented lists, a user list, and a read-only news
|
||||
announcement list:
|
||||
announcement list. See the posted archives to get a feel for the
|
||||
volume of list traffic for each list and to read/search past
|
||||
discussions.
|
||||
|
||||
http://sourceforge.net/mail/?group_id=105292
|
||||
On-line web forums are likewise available on the project site at
|
||||
http://sourceforge.net/forum/?group_id=105292
|
||||
|
||||
For interactive discussion, please join our Zulip chat:
|
||||
A variety of information on BRL-CAD is available via the
|
||||
World-Wide-Web. Papers, documentation, and the software repository
|
||||
may be found at:
|
||||
|
||||
https://brlcad.zulipchat.com
|
||||
http://brlcad.org
|
||||
|
||||
In addition to the above, there is an official BRL-CAD IRC channel on
|
||||
the Freenode network that may be reached by joining #brlcad on
|
||||
irc.freenode.net connecting via port 6667. For first-time users,
|
||||
there is a web-based IRC client available for certain browsers at:
|
||||
|
||||
http://irc.brlcad.org
|
||||
|
||||
IRC is the preferred method of communication to interact with the
|
||||
BRL-CAD developers, to get involved with the project, obtain support,
|
||||
or provide direct feedback.
|
||||
|
||||
|
||||
BUG REPORTS AND FEATURE REQUESTS
|
||||
--------------------------------
|
||||
|
||||
Please submit all bugs, support requests, and feature requests to:
|
||||
Please report any bugs encountered to the project bug tracker at
|
||||
http://sourceforge.net/tracker/?group_id=105292&atid=640802
|
||||
|
||||
https://github.com/BRL-CAD/brlcad/issues
|
||||
Similarly, please post any request for feature enhancements or support
|
||||
request to http://sourceforge.net/tracker/?group_id=105292&atid=640805
|
||||
and http://sourceforge.net/tracker/?group_id=105292&atid=640803
|
||||
respectively.
|
||||
|
||||
|
||||
DISTRIBUTION DETAILS
|
||||
--------------------
|
||||
|
||||
BRL-CAD releases are available at:
|
||||
BRL-CAD is freely available and distributed in both binary and source
|
||||
code form through the BRL-CAD project website on Sourceforge:
|
||||
|
||||
https://github.com/BRL-CAD/brlcad/releases
|
||||
http://sf.net/projects/brlcad/
|
||||
|
||||
Assets stored for each release will always include source archives,
|
||||
and usually binary compilations for commonly used operating systems.
|
||||
The package is similarly available via a Subversion repository. To
|
||||
obtain the latest, follow the directions for anonymous checkout at:
|
||||
|
||||
For developers, BRL-CAD is available via Git version control cloning:
|
||||
http://sourceforge.net/svn/?group_id=105292
|
||||
|
||||
https://github.com/BRL-CAD/brlcad
|
||||
There is also a paid-for full-service support distribution available
|
||||
for those interested through SURVICE Engineering, Inc., and the
|
||||
Survivability/Vulnerability Information Analysis Center (SURVIAC).
|
||||
|
||||
SURVICE provides their own BRL-CAD distribution that comes with
|
||||
commercial support, documentation, and installation media. Full
|
||||
technical assistance is provided to their commercial distributions by
|
||||
phone, FAX, postal mail, or e-mail. Agencies of the Federal
|
||||
Government may acquire the full service distribution with a MIPR or
|
||||
OGA funds transfer.
|
||||
|
||||
For further details, contact:
|
||||
|
||||
BRL-CAD Distribution
|
||||
SURVIAC Aberdeen Satellite Office
|
||||
4695 Millennium Drive
|
||||
Belcamp, MD 210017-1505 USA
|
||||
|
||||
|
||||
BACKGROUND INFORMATION
|
||||
@@ -171,12 +246,44 @@ Linux, and Windows.
|
||||
|
||||
The BRL-CAD package is intentionally designed to be extensively
|
||||
cross-platform and is actively developed on and maintained for many
|
||||
common operating system environments including various BSD
|
||||
distributions, Linux, Solaris, Mac OS X, and Windows. The entire
|
||||
package is distributed in binary and source code form as free open
|
||||
source software (FOSS), provided under Open Source Initiative (OSI)
|
||||
approved license terms. BRL-CAD was released as open source in
|
||||
December 2004. See the COPYING file for more details.
|
||||
common operating system environments including for BSD, IRIX, Linux,
|
||||
Solaris, Mac OS X, and Windows among others. The entire package is
|
||||
distributed in binary and source code form as free open source
|
||||
software (FOSS), provided under Open Source Initiative (OSI) approved
|
||||
license terms. BRL-CAD was released as open source in December 2004.
|
||||
See the COPYING file for more details.
|
||||
|
||||
|
||||
FUTURE EVENTS
|
||||
-------------
|
||||
|
||||
It is expected that new releases of BRL-CAD will be issued
|
||||
approximately once a month. A new release is scheduled for
|
||||
distribution at the beginning of every month, usually being posted
|
||||
sometime within the first week of every month.
|
||||
|
||||
Depending on need, demand, and activity, additional releases may also
|
||||
be made. The additional releases will be heavily dependent upon the
|
||||
level of user involvement and contributions in particular.
|
||||
Information about new releases will be routinely provided by
|
||||
electronic mail to recipients of this software as well as to the
|
||||
BRL-CAD NEWS mailing list:
|
||||
|
||||
http://sourceforge.net/mail/?group_id=105292
|
||||
|
||||
Periodically, training and user group meetings are provided with
|
||||
announcements similarly posted to the BRL-CAD NEWS mailing list.
|
||||
Several BRL-CAD developers also regularly attend the ACM Siggraph
|
||||
conference, the ACM Solid and Physical Modeling conference, and other
|
||||
similar conferences, conventions, and symposiums as well.
|
||||
|
||||
|
||||
GETTING HELP
|
||||
------------
|
||||
|
||||
Feel free to direct any unanswered questions relating to BRL-CAD via
|
||||
e-mail or to any of the other contact means described above in the
|
||||
COMMUNICATIONS section of this document.
|
||||
|
||||
Best Wishes,
|
||||
The BRL-CAD Development Team
|
||||
|
||||
@@ -1,359 +0,0 @@
|
||||
# BRL-CAD RMF/STIG Cat 1 Vulnerability Tracking Ledger
|
||||
**Last Synchronized:** 2026-09-28 03:00:00 UTC
|
||||
|
||||
| Issue ID | File | Lines | Cat 1 Type | Sev | Verification | Fix Status | 1-Sentence Nature of Issue |
|
||||
|:---|:---|:---:|:---|:---:|:---:|:---:|:---|
|
||||
| `SEC-0001` | `src/libpkg/pkg.c` | `1876-1923` | Invalid Free / Crasher | 3 | `CONFIRMED` | `FIXED` | pkg_waitfor fails to clear pc->pkc_buf on excess message length, causing subsequent pkg_close to call free on caller stack memory. |
|
||||
| `SEC-0002` | `src/libpkg/pkg.c` | `1960-1968` | Uninitialized Memory Access | 2 | `CONFIRMED` | `FIXED` | pkg_bwaitfor returns uninitialized heap buffer instead of NULL when network read fails or disconnects prematurely. |
|
||||
| `SEC-0003` | `src/libpkg/example_qt/server.cpp` | `46-59` | NULL Pointer Dereference / Crasher | 1 | `PENDING` | `UNFIXED` | PKGServer destructor unconditionally dereferences NULL client pointer and frees uninitialized pkc_inbuf. |
|
||||
| `SEC-0004` | `src/fbserv/server.c` | `432-540` | Heap Out-of-Bounds Read / Crasher | 3 | `CONFIRMED` | `FIXED` | fbserv packet handlers fail to validate packet payload length against pixel count before calling fb_write, causing heap out-of-bounds read. |
|
||||
| `SEC-0005` | `src/fbserv/server.c` | `476-580` | Integer Overflow / Heap Buffer Overflow | 3 | `CONFIRMED` | `FIXED` | Integer multiplication overflow in width*height in fb_readrect and fb_bwreadrect leads to heap buffer overflow during pixel read. |
|
||||
| `SEC-0006` | `src/remrt/rtsrv.c` | `891-971` | Integer Signedness / Out-of-Bounds Memory Access | 2 | `CONFIRMED` | `FIXED` | ph_lines fails to validate pixel range bounds, causing signed integer underflow in (b-a+1)*3 to wrap to huge size_t in pkg_2send, triggering out-of-bounds heap reads, and leaks buffer. |
|
||||
| `SEC-0007` | `src/remrt/remrt.c` | `3803-3806` | Unhandled Input Validation / Denial of Service | 2 | `CONFIRMED` | `FIXED` | ph_pixels parses incoming MSG_PIXELS without checking packet length or magic header, allowing malformed network packets to trigger out-of-bounds reads or terminate remrt via bu_bomb. |
|
||||
| `SEC-0008` | `src/libbu/parse.c` | `87-118` | Out-of-Bounds Memory Access / Buffer Underflow | 2 | `CONFIRMED` | `FIXED` | bu_struct_wrap_buf and PARSE_CK_GETPUT do not verify buffer length is at least 8 bytes, causing negative index access and out-of-bounds read on buffers with small or zero length. |
|
||||
| `SEC-0009` | `src/libbu/vls_vprintf.c` | `186-226` | Format String / Type Confusion | 2 | `CONFIRMED` | `FIXED` | vls_vprintf uses bitwise XOR (^=) instead of bitwise AND NOT (&= ~) to clear length modifiers, corrupting flags and causing incorrect type extraction from va_list. |
|
||||
| `SEC-0010` | `src/libbu/vls.c` | `433-465` | Off-by-One / Buffer Corruption | 2 | `CONFIRMED` | `FIXED` | bu_vls_substr calls bu_vls_putc with NUL, embedding an unwanted NUL byte and off-by-one corrupting vls_len. |
|
||||
| `SEC-0011` | `src/libbu/malloc.c` | `84-145,375-388` | Integer Overflow / Heap Overflow | 2 | `CONFIRMED` | `FIXED` | alloc() and bu_pool_alloc() lack integer multiplication overflow checks on cnt*size, which can cause undersized memory allocations and subsequent heap buffer overflows. |
|
||||
| `SEC-0012` | `src/libbu/argv.c` | `97,175,268-295` | Buffer Underflow / Out-of-bounds Pointer | 2 | `CONFIRMED` | `FIXED` | bu_argv_from_string computed pointer at strlen(lp)-1 on potentially empty string causing integer underflow and out-of-bounds pointer arithmetic. |
|
||||
| `SEC-0013` | `src/libbu/str.c` | `61-75` | Buffer Over-read | 2 | `CONFIRMED` | `FIXED` | bu_strlcatm uses unbounded strlen on dst to detect un-terminated buffers, causing out-of-bounds read. |
|
||||
| `SEC-0014` | `src/libbu/b64.c` | `216-284` | Null Pointer Dereference / Integer Overflow | 2 | `CONFIRMED` | `FIXED` | bu_b64 encode and decode functions lacked null pointer checks on input/output and cast lengths to signed 32-bit int. |
|
||||
| `SEC-0015` | `src/libbu/sscanf.c` | `312-320,365-375` | Format String / Scanset Parser Bug | 2 | `CONFIRMED` | `FIXED` | bu_vsscanf omitted literal ] and ^] from partFmt when extracting scanset specifiers, causing malformed format strings and scan failure. |
|
||||
| `SEC-0016` | `src/libbu/bitv.c` | `95-105,285-295,440-445,625-630` | Null Pointer Dereference / Integer Overflow | 2 | `CONFIRMED` | `FIXED` | bu_hex_to_bitv and bu_binary_to_bitv2 crashed on NULL input, and bu_bitv_shift_vector had integer overflow UB on INT_MIN. |
|
||||
| `SEC-0017` | `src/libbu/hash.c` | `125-135,180-190,270-280` | Null Pointer Dereference / Memory Safety | 2 | `CONFIRMED` | `FIXED` | bu_hash_get crashed on NULL key in _nhash_keycmp, and bu_hash_create/bu_hash_set lacked allocation failure handling. |
|
||||
| `SEC-0018` | `include/bu/ptbl.h, src/libbu/ptbl.c` | `105,119-120; 63,99,214,240,266,290` | Memory Access Violation / Buffer Overflow / Out-of-bounds Pointer | 3 | `CONFIRMED` | `FIXED` | BU_PTBL_FOR macro and BU_PTBL_LASTADDR cause out-of-bounds pointer calculation and segfault on empty tables with NULL buffers, and table reallocations lack integer multiplication overflow checks. |
|
||||
| `SEC-0019` | `src/libbu/affinity.c` | `74,90-104,108` | Out-of-bounds Bit Array Access / Resource Leak / Undefined Behavior | 2 | `CONFIRMED` | `FIXED` | parallel_set_affinity permitted negative cpu indexing into CPU_SET and negative bitshift on Windows, leaked Mach thread port rights, and passed wrong policy type for Mach thread affinity. |
|
||||
| `SEC-0020` | `src/libbu/backtrace.c` | `324,596,659-661,742` | NULL Pointer Dereference / Process Signal Safety | 2 | `CONFIRMED` | `FIXED` | bu_backtrace_app called bu_strlcpy on potentially NULL gdb_path, used negative file descriptors in write, and reaped arbitrary child processes via wait(NULL). |
|
||||
| `SEC-0021` | `src/libbu/cmd.c` | `50-66` | NULL Pointer Dereference / Buffer Underflow / Crasher | 2 | `CONFIRMED` | `FIXED` | bu_cmd lacked null checks on cmds, argv, and argv[cmd_index], allowed negative cmd_index causing buffer underflow, and executed unverified function pointers. |
|
||||
| `SEC-0022` | `src/libbu/damlevlim.cpp` | `68-159` | Integer Multiplication Overflow / Crasher | 2 | `CONFIRMED` | `FIXED` | bu_editdist computed buffer allocation size as (n+1)*(m+1) using signed 32-bit int, causing signed integer multiplication overflow, out-of-bounds access, and std::length_error crash on large strings. |
|
||||
| `SEC-0023` | `src/libbu/dirent.c, src/libbu/datetime.cpp` | `36-88; 173-197` | Heap Buffer Overflow / NULL Pointer Dereference / TOCTOU | 2 | `CONFIRMED` | `FIXED` | bu_file_list called opendir(NULL) when path is NULL and suffered from heap buffer overflow if directory entries were added concurrently between passes; bu_utctime crashed on NULL vls_gmtime. |
|
||||
| `SEC-0024` | `src/libbu/dir.c` | `69-75, 108, 169, 186, 248, 254, 395-405, 480-535, 656-665, 684-740` | Buffer Overflow / Underflow / NULL Pointer Dereference / Infinite Loop | 2 | `CONFIRMED` | `FIXED` | dir routines passed caller buffer len to fixed stack arrays risking stack buffer overflow, permitted underflow pointer reads in _bu_dir_join_path, crashed on NULL result in vdir, and risked infinite loop or crash in bu_mkdir/bu_dirclear on invalid paths. |
|
||||
| `SEC-0025` | `src/libbu/dylib.c` | `38-40, 70-87, 105-120` | Heap Use-After-Free / Double-Free / Thread Safety | 3 | `CONFIRMED` | `FIXED` | bu_dlunload freed the global handles table without resetting handles to NULL or max_handles to 0, leading to dangling pointer use-after-free heap writes on subsequent bu_dlclose calls and double-free on subsequent bu_dlunload calls; routines lacked thread synchronization. |
|
||||
| `SEC-0026` | `src/libbu/fchmod.cpp` | `62-75` | Invalid File Descriptor / Parameter Validation | 1 | `CONFIRMED` | `FIXED` | bu_fchmod passed unvalidated negative file descriptors to OS handles routines triggering CRT parameter validation errors or unexpected failures. |
|
||||
| `SEC-0027` | `src/libbu/file.cpp` | `79-110, 126-166, 193, 227-240, 360, 603-640` | Memory Leak / Resource Leak / NULL Pointer Dereference / Logic Flaw | 2 | `CONFIRMED` | `FIXED` | bu_file_same leaked allocated realpath strings on match and crashed on NULL paths, file_compare_info had an assignment instead of comparison operator bug, bu_file_exists leaked file descriptors, and stream seek/tell functions crashed on NULL streams. |
|
||||
| `SEC-0028` | `src/libbu/fnmatch.c` | `308-311` | NULL Pointer Dereference / Crasher | 2 | `CONFIRMED` | `FIXED` | bu_path_match immediately dereferenced pattern and string without NULL pointer checks, causing immediate SIGSEGV crashes on NULL inputs. |
|
||||
| `SEC-0029` | `src/libbu/gethostname.c` | `49, 81-84, 89` | Invalid Pointer Cast / NULL Pointer Dereference / Buffer Overflow | 2 | `CONFIRMED` | `FIXED` | bu_gethostname passed constant (LPDWORD)MAXPATHLEN as pointer to GetComputerName causing invalid pointer crash, left procfs file pointer unchecked causing null stream crash, and lacked entry bounds validation. |
|
||||
| `SEC-0030` | `src/libbu/getopt.c` | `34-39, 48-56, 65-72, 84, 98` | NULL Pointer Dereference / Buffer Over-read / Logic Flaw | 2 | `CONFIRMED` | `FIXED` | bu_getopt dereferenced NULL nargv elements and NULL *nargv in tell macro, read out of bounds on '\0' matched in ostr via strchr, and misidentified bare '-' as an option. |
|
||||
| `SEC-0031` | `src/libbu/glob.c` | `63, 84, 110, 161, 195, 240, 259, 286` | NULL Pointer Dereference / Crasher | 2 | `CONFIRMED` | `FIXED` | bu_glob internal helpers and callbacks dereferenced NULL pattern, path, directory entry, or stat buffer pointers without checking for NULL. |
|
||||
| `SEC-0032` | `src/libbu/heap.c` | `136, 200-216, 255` | Out-of-bounds Array Access / Integer Underflow | 2 | `CONFIRMED` | `FIXED` | bu_heap_get bypassed allocation size range check when DEBUG was not defined causing out-of-bounds heap bin indexing and underflow to SIZE_MAX when sz == 0, and lacked cpu id bounds clamping. |
|
||||
| `SEC-0033` | `src/libbu/hist.c` | `52, 82-100, 117-128` | Out-of-bounds Memory Write / NULL Pointer Dereference | 2 | `CONFIRMED` | `FIXED` | bu_hist_range permitted negative or out-of-bounds 'a' indexing on NaN inputs causing heap write access violation, and bu_hist_init/bu_hist_pr crashed on NULL inputs. |
|
||||
| `SEC-0034` | `src/libbu/interrupt.c` | `78-83, 100-116, 137-163` | Signal Handler Leak / Out-of-bounds Array Access / Logic Flaw | 2 | `CONFIRMED` | `FIXED` | interrupt_restore_signal never restored signal handlers when no signal was received leaving temporary handler active indefinitely, checked wrong handler pointer, and lacked bounds check on signum. |
|
||||
| `SEC-0035` | `src/libbu/num.c` | `35-58, 87-90, 106` | Buffer Underflow / Integer Overflow UB / Out-of-bounds Read | 2 | `CONFIRMED` | `FIXED` | bu_num_print read out-of-bounds at tbl_start[-1] due to reversed condition ordering in trailing newline scan and crashed on empty strings; char_length had signed integer overflow UB on INT64_MIN and truncated 64-bit int to long. |
|
||||
| `SEC-0036` | `src/libbu/log.c` | `148, 156, 204, 222, 335` | NULL Pointer Dereference / Integer Overflow | 2 | `CONFIRMED` | `FIXED` | bu_flog lacked null pointer and empty string checks on fmt and fp, causing NULL pointer dereference crashes in fwrite, and bu_log helper routines lacked null pointer guards. |
|
||||
| `SEC-0037` | `src/libbu/mappedfile.c` | `360, 544-550, 577` | NULL Pointer Dereference / Integer Underflow | 2 | `CONFIRMED` | `FIXED` | bu_open_mapped_file_with_path crashed with SIGSEGV on NULL name or path, bu_free_mapped_files suffered from unsigned integer underflow on index removal, and bu_open_mapped_file allowed invalid file sizes. |
|
||||
| `SEC-0038` | `src/libbu/observer.c` | `36, 58, 110, 168, 194, 215` | NULL Pointer Dereference / Memory Safety | 2 | `CONFIRMED` | `FIXED` | bu_observer_cmd and helper routines dereferenced NULL argv or NULL observer lists without validation, and bu_observer_free left dangling pointers in the observer list. |
|
||||
| `SEC-0039` | `src/libbu/lex.c` | `42, 131, 155, 257, 268` | Integer Underflow / NULL Pointer Dereference | 2 | `CONFIRMED` | `FIXED` | lex_getone allowed negative *used integer underflow on number fallback, and bu_lex crashed on NULL token, rtstr, or NULL key strings. |
|
||||
| `SEC-0040` | `src/libbu/path_normalize.c` | `47, 86-88, 95` | Buffer Underflow / Concurrency Hazard / Integer Bounds | 2 | `CONFIRMED` | `FIXED` | bu_path_normalize used non-thread-safe static buffer, lacked lower-bound check in backward component scan allowing pointer underflow before resolved buffer, and used unchecked signed pointer arithmetic for MAXPATHLEN bounds check. |
|
||||
| `SEC-0041` | `src/libbu/printb.c` | `36, 40-52` | NULL Pointer Dereference / Undefined Bitshift / Out-of-bounds Read | 2 | `CONFIRMED` | `FIXED` | bu_vls_printb dereferenced NULL vls and bits strings, shifted signed 1L by negative or out-of-range bit numbers causing undefined behavior, and read out-of-bounds on strings ending after bit numbers. |
|
||||
| `SEC-0042` | `src/libbu/path.c` | `177-180, 211-218, 242-258` | NULL Pointer Dereference / Path Truncation Flaw | 2 | `CONFIRMED` | `FIXED` | bu_path_to_argv dereferenced NULL ac pointer causing crash, and bu_path_component corrupted file paths by stripping directories when a dot appeared in directory names under BU_PATH_EXTLESS and BU_PATH_EXT. |
|
||||
| `SEC-0043` | `src/libbu/parallel_cpp11thread.cpp` | `28-51` | Crash / Unhandled Exception / NULL Function Pointer Dereference | 2 | `CONFIRMED` | `FIXED` | parallel_cpp11thread crashed on NULL func callback and caused std::terminate() aborts if thread creation threw an exception while previous threads remained joinable. |
|
||||
| `SEC-0044` | `src/libbu/progname.c` | `74-79, 140-143, 155-190` | Concurrency Hazard / Unchecked Buffer Overflow | 2 | `CONFIRMED` | `FIXED` | bu_argv0_full_path and bu_getprogname returned static non-thread-safe buffers and accessed bu_progname unsynchronized with concurrent bu_setprogname writes, and bu_argv0_full_path unchecked bu_getcwd return and appended with potential buffer overflow. |
|
||||
| `SEC-0045` | `src/libbu/realpath.c` | `38-66` | NULL Pointer Dereference / Crash | 2 | `CONFIRMED` | `FIXED` | bu_file_realpath dereferenced NULL path pointer into realpath, GetFullPathName, and bu_strlcpy fallback causing immediate SIGSEGV crashes. |
|
||||
| `SEC-0046` | `src/libbu/scan.c` | `38, 58-60, 68-73, 89-93` | Format String Flaw / Uninitialized Variable Memory Corruption | 2 | `CONFIRMED` | `FIXED` | bu_scan_fastf_t constructed dynamic scanf format strings from user delimiter allowing format string injection, and read uninitialized stack variable 'len' into offset when sscanf failed to reach %n specifier. |
|
||||
| `SEC-0047` | `src/libbu/semaphore.c` | `260-286, 298-301, 340-343` | Out-of-bounds Array Access / Concurrency Race Condition | 2 | `CONFIRMED` | `FIXED` | bu_semaphore_acquire and bu_semaphore_release lacked upper bounds checks on semaphore index causing out-of-bounds array access and integer overflow on UINT_MAX, and bu_semaphore_free destroyed mutexes without synchronizing on bu_init_lock. |
|
||||
| `SEC-0048` | `src/libbu/sha1.c` | `53, 110, 126, 150` | NULL Pointer Dereference / Memory Safety | 2 | `CONFIRMED` | `FIXED` | SHA1Transform, SHA1Init, SHA1Update, and SHA1Final lacked NULL pointer validation on context, data, digest, state, and buffer pointers causing SIGSEGV crashes. |
|
||||
| `SEC-0049` | `src/libbu/snooze.cpp` | `35-42` | Integer Overflow UB / Logic Flaw | 1 | `CONFIRMED` | `FIXED` | bu_snooze lacked upper bound clamping on 64-bit useconds causing integer overflow when converted to nanoseconds internally in std::chrono durations. |
|
||||
| `SEC-0050` | `src/libbu/sort.c` | `156-189, 381-402` | Memory Access Flaw / Divide by Zero | 2 | `CONFIRMED` | `FIXED` | bu_sort lacked checks for NULL a, NULL cmp, zero element size es == 0 (causing division by zero in introsort), and min(a, b) macro lacked parameter parentheses. |
|
||||
| `SEC-0051` | `src/libbu/tbl.c` | `381-432` | Buffer Underflow / Pointer Overflow | 2 | `CONFIRMED` | `FIXED` | bu_tbl_printf suffered from backward scan buffer underflow dereferencing buf[-1] and unbounded runaway pointer increment last += 2 over-reading memory. |
|
||||
| `SEC-0052` | `src/libbu/tc.c` | `33-200, 428-456` | Null Pointer Dereference / Memory Management | 2 | `CONFIRMED` | `FIXED` | bu_thrd_create dereferenced NULL thr pointer and lacked guard on NULL func; mutex and condition variable routines lacked NULL checks; used raw malloc/free. |
|
||||
| `SEC-0053` | `src/libbu/tcllist.c` | `538, 554-565` | Buffer Over-read / Null Pointer Dereference | 2 | `CONFIRMED` | `FIXED` | bu_argv_from_tcl_list crashed on NULL arguments; _bu_tcl_copy_collapse passed strlen(src) instead of remaining count to _bu_tcl_parse_backslash, allowing read out of bounds past list element. |
|
||||
| `SEC-0054` | `src/libbu/temp.c` | `85-151, 155-175` | Uninitialized Memory / Heap Corruption / Concurrency | 3 | `CONFIRMED` | `FIXED` | temp_add_to_list failed to copy initial_temp_files when reallocating from 8 to 16 elements, reading uninitialized memory and calling close() on garbage file descriptors at exit; global temp list lacked thread synchronization. |
|
||||
| `SEC-0055` | `src/libbu/units.c` | `237-244, 256-270, 390-440` | Buffer Underflow / Null Pointer Dereference | 2 | `CONFIRMED` | `FIXED` | units_name_matches underflowed bu_vls_strlen - 1 to SIZE_MAX on empty strings/whitespace, causing out-of-bounds heap read; bu_units_conversion, bu_mm_value, and bu_mm_cvt crashed on NULL pointers. |
|
||||
| `SEC-0056` | `src/libbu/units_dehumanize.c` | `80-92, 131-137` | Null Pointer Dereference / Integer Overflow UB | 1 | `CONFIRMED` | `FIXED` | bu_dehumanize_number crashed on NULL str or size and performed signed multiplication without pre-overflow bounds check. |
|
||||
| `SEC-0057` | `src/libbu/units_humanize.c` | `74-82, 128-133` | Null Pointer Dereference / Integer Overflow UB | 2 | `CONFIRMED` | `FIXED` | bu_humanize_number dereferenced buf[0] before validating buf != NULL, causing crash when called with a NULL buffer; negation of INT64_MIN caused signed integer overflow UB. |
|
||||
| `SEC-0058` | `src/libbu/uuid.c` | `56, 89, 118-124, 134-161` | Buffer Overflow / Null Pointer Dereference / Logic Flaw | 2 | `CONFIRMED` | `FIXED` | bu_uuid_decode suffered critical 16-byte buffer overflow writing 32 bytes to a 16-byte array on non-adjacent hex strings; bu_uuid_create crashed on NULL uuid and corrupted UUIDv5 bits with 0x5F instead of 0x50; bu_uuid_encode crashed on NULL pointers. |
|
||||
| `SEC-0059` | `src/libbu/vfont.c` | `42, 60-100, 140-150, 184-196, 201-207` | File Descriptor Leak / Uninitialized Data / Null Dereference | 2 | `CONFIRMED` | `FIXED` | vfont_get passed potential NULL from bu_dir() to snprintf %s, left 256th dispatch entry uninitialized (i < 255), leaked file descriptors on read failures in get_font, and vfont_free crashed on NULL pointer. |
|
||||
| `SEC-0060` | `src/libbu/vlb.c` | `34-160` | Integer Overflow / Null Pointer Dereference | 2 | `CONFIRMED` | `FIXED` | bu_vlb_write lacked integer overflow protection on capacity addition and crashed when given NULL start; bu_vlb_init, bu_vlb_initialize, bu_vlb_free, and bu_vlb_print crashed on NULL pointers. |
|
||||
| `SEC-0061` | `src/libbu/cache.cpp` | `110-140, 220-250, 480-510` | Undefined Behavior / Memory Leak / Null Pointer Dereference | 2 | `CONFIRMED` | `FIXED` | bu_cache_close freed bu_cache_impl containing std::mutex with BU_PUT instead of delete causing destructor bypass and undefined behavior; bu_cache_keys leaked keystr memory; bu_cache_write_commit underflowed mv_size on negative lengths; NULL txn crashed transactions. |
|
||||
| `SEC-0062` | `src/libbu/color.cpp` | `52-95, 120-160` | Null Pointer Dereference / Float Validity | 2 | `CONFIRMED` | `FIXED` | bu_color_from_str, bu_rgb_to_hsv, and bu_hsv_to_rgb dereferenced NULL pointers unconditionally without validation; bu_color_from_rgb_floats lacked bounds and finite checks. |
|
||||
| `SEC-0063` | `src/libbu/convert.c` | `120-160, 200-240` | Buffer Overflow / Unsigned Underflow | 2 | `CONFIRMED` | `FIXED` | bu_cv_fmt_cookie decremented buflen below zero on small buffers (1-2 bytes), wrapping to SIZE_MAX and writing out of bounds; bu_cv_w_cookie and byte swap routines crashed on NULL or empty input. |
|
||||
| `SEC-0064` | `src/libbu/crashreport.c` | `110-140, 210-230` | File Descriptor Leak / Null Pointer Dereference | 2 | `CONFIRMED` | `FIXED` | bu_crashreport leaked file descriptor when ferror(fp) was true, and formatted potential NULL return from ctime(). |
|
||||
| `SEC-0065` | `src/libbu/env.c` | `140-190, 240-270` | Memory Leak / Null Pointer Dereference / Unchecked Input | 2 | `CONFIRMED` | `FIXED` | editor_not_compatible leaked component vls and dereferenced NULL candidate; editor_file_check lacked NULL checks; bu_setenv lacked POSIX environment variable name validation. |
|
||||
| `SEC-0066` | `src/libbu/opt.c` | `215-260, 480-520` | Null Pointer Dereference / Buffer Over-read / Type Mismatch | 2 | `CONFIRMED` | `FIXED` | opt_describe_internal_ascii crashed when arg_helpstr or help_string was NULL; docbook describe had curr vs d typo; opt_process over-read empty candidate; bu_opt_color had unsigned char type mismatch. |
|
||||
| `SEC-0067` | `src/libbu/parallel.c` | `280-310` | Out-of-Bounds Memory Access | 2 | `CONFIRMED` | `FIXED` | PARALLEL_PUT accessed mapping[id] without validating 0 <= id < MAX_PSW*MAX_PSW, causing out-of-bounds memory corruption. |
|
||||
| `SEC-0068` | `src/libbu/process.c` | `350-380, 520-560, 1220-1250` | Null Pointer Dereference / Memory Leak / Buffer Overflow | 2 | `CONFIRMED` | `FIXED` | bu_process_read unconditionally dereferenced *count = ... even if caller passed NULL; bu_process_exec leaked heap av on every execution; bu_interactive passed unchecked fd to FD_SET causing buffer overflow. |
|
||||
| `SEC-0069` | `src/libbu/uce-dirent.h` | `348-354, 578-583, 608-612` | Null Pointer Dereference | 2 | `CONFIRMED` | `FIXED` | opendir, rewinddir, and _initdir relied solely on assert() in debug mode, crashing with NULL pointer dereference in release builds when given NULL dirname or DIR stream. |
|
||||
| `SEC-0070` | `src/libbu/vls_incr.cpp` | `136-155, 180-188` | Unhandled Exception / Denial of Service Crash | 2 | `CONFIRMED` | `FIXED` | bu_vls_incr accessed ivar.str(1) and nvar.str(1) without verifying match group count, throwing std::out_of_range which bypassed catch (const std::regex_error&) and crashed the application. |
|
||||
| `SEC-0071` | `src/libbu/whereami.c` | `95-135` | Null Pointer Dereference | 2 | `CONFIRMED` | `FIXED` | _bu_getExecutablePath dereferenced pname[0] without checking if _bu_progname_raw() returned NULL, and copied memory into out when out == NULL. |
|
||||
| `SEC-0072` | `src/libbu/whereis.c` | `135-155` | Infinite Loop / Denial of Service | 2 | `CONFIRMED` | `FIXED` | bu_whereis bypassed pointer advancement on dirlen > MAXPATHLEN-2 with continue;, causing an infinite loop hanging the process at 100% CPU. |
|
||||
| `SEC-0073` | `src/libbu/which.c` | `91-115` | Infinite Loop / Memory Leak | 2 | `CONFIRMED` | `FIXED` | which_path suffered infinite loop on oversized directories and empty matches, and leaked initial_path every time an executable was not found. |
|
||||
| `SEC-0074` | `src/libbu/xdr.c` | `31-88` | Null Pointer Dereference | 2 | `CONFIRMED` | `FIXED` | bu_pshort, bu_gshort, bu_plong, bu_glong, and bu_plonglong dereferenced msgp without validating msgp != NULL, causing immediate segmentation fault. |
|
||||
| `SEC-0075` | `src/libbu/tests/dylib/dylib.c` | `35-85` | Memory Leak / Null Pointer Dereference | 2 | `CONFIRMED` | `FIXED` | bu_file_list allocated filenames and bu_vls plugin_pattern allocated memory which was never freed; dylib_close_plugins dereferenced NULL pointer when called with plugins == NULL. |
|
||||
| `SEC-0076` | `src/libbu/tests/dylib/plugin_1.cpp` | `22-28` | Null Pointer Dereference | 2 | `CONFIRMED` | `FIXED` | calc dereferenced *result without checking if *result == NULL, causing crash on NULL buffer pointer. |
|
||||
| `SEC-0077` | `src/libbu/tests/dylib/plugin_2.cpp` | `22-28` | Null Pointer Dereference | 2 | `CONFIRMED` | `FIXED` | calc dereferenced *result without checking if *result == NULL, causing crash on NULL buffer pointer. |
|
||||
| `SEC-0078` | `src/libbu/tests/test_dirname.c` | `58-82` | Stack Buffer Overflow / Format String UB | 2 | `CONFIRMED` | `FIXED` | bu_strlcpy used strlen(input)+1 instead of destination buffer size, causing stack buffer overflow on strings exceeding 1000 bytes; passed NULL to printf format string. |
|
||||
| `SEC-0079` | `src/libbu/tests/test_encode.c` | `70-90` | Undefined Behavior / Crash | 1 | `CONFIRMED` | `FIXED` | Passed NULL str directly to %*s and %s in printf when testing test_encode(NULL), causing undefined behavior and potential crash. |
|
||||
| `SEC-0080` | `src/libbu/tests/test_datetime.c` | `243-345` | Memory Leak / Unchecked Return | 1 | `CONFIRMED` | `FIXED` | result VLS was allocated and never freed across multiple date/time tests, leaking memory; sscanf return value was unvalidated. |
|
||||
| `SEC-0081` | `src/libbu/tests/test_basename.c` | `55-65, 130-140` | Null Pointer Dereference / Crash | 2 | `CONFIRMED` | `FIXED` | get_system_output(NULL) called basename(NULL) which causes segmentation fault on glibc implementations; passed NULL input to bu_log format strings. |
|
||||
| `SEC-0082` | `src/libbu/tests/test_progname.c` | `63-71, 107-115, 149-157, 189-197` | Heap Buffer Overflow / Off-by-one | 2 | `CONFIRMED` | `FIXED` | Allocated strlen(path) bytes via bu_calloc without space for null terminator before calling bu_strlcpy, causing buffer overflow; leaked allocated buffer. |
|
||||
| `SEC-0083` | `src/libbu/tests/test_mappedfile.c` | `70-74, 385-397` | Use-After-Free / Memory Leak / Float Comparison | 2 | `CONFIRMED` | `FIXED` | Accessed mfp->buf after closing mapped file via bu_close_mapped_file, performed raw float equality on double num, and leaked fname VLS. |
|
||||
| `SEC-0084` | `src/libbu/tests/test_process.c` | `172-184, 521-536, 680-705` | Process Resource Leak / NULL Pointer Dereference | 2 | `CONFIRMED` | `FIXED` | Failed to wait on or close process handles on error paths leaking processes, and attempted to close/read NULL file handles when fopen failed. |
|
||||
| `SEC-0085` | `src/libbu/tests/test_parallel.c` | `70-80, 115-125` | Array Out-of-Bounds / Crash | 2 | `CONFIRMED` | `FIXED` | Indexed counter array with cpu ID up to ncpu in tally without bound check, and omitted NULL data check in parallel recursion callback. |
|
||||
| `SEC-0086` | `src/libbu/tests/test_opt.c` | `58-64, 492-498` | Out-of-Bounds Memory Read / Pointer Type-Punning | 2 | `CONFIRMED` | `FIXED` | Read av[-1] when av was decremented without checking bounds, and type-punned unsigned int array to unsigned char pointer violating strict aliasing. |
|
||||
| `SEC-0087` | `src/libbu/tests/test_hook.c` | `45-55, 120-145` | NULL Pointer Dereference / Memory Leak | 2 | `CONFIRMED` | `FIXED` | Callback dereferenced clientdata pointer without NULL check and hook list structures were allocated and never freed across tests. |
|
||||
| `SEC-0088` | `src/libbu/tests/test_glob.c` | `95-110, 195-205` | Out-of-Bounds Read / NULL Pointer Dereference | 2 | `CONFIRMED` | `FIXED` | Read buffer out of bounds when checking trailing slash on short paths and called glob operations without validating NULL context pointers. |
|
||||
| `SEC-0089` | `src/libbu/tests/test_env.c` | `80-92, 128-135` | Resource Leak / Unchecked Return Value | 1 | `CONFIRMED` | `FIXED` | Did not check fopen return value before writing and failed to validate bu_strdup return value leaking memory on error. |
|
||||
| `SEC-0090` | `src/libbu/tests/test_escape.c` | `72-85, 140-150` | NULL Pointer Dereference / Format Flaw | 1 | `CONFIRMED` | `FIXED` | Passed unverified pointer to %s format specifier in printf calls and omitted explicit return code in test helper. |
|
||||
| `SEC-0091` | `src/libbu/tests/test_path_component.c` | `62-75` | Format String Flaw / NULL Dereference | 1 | `CONFIRMED` | `FIXED` | Passed NULL pointer to %24s in bu_log formatting calls, which crashes strict C runtime environments. |
|
||||
| `SEC-0092` | `src/libbu/tests/test_humanize_number.c` | `115-135` | Memory Leak | 1 | `CONFIRMED` | `FIXED` | Allocated string representations of flags and scale inside loop iterations without freeing them, causing repeated memory leaks. |
|
||||
| `SEC-0093` | `src/libbu/tests/test_file.c` | `70-75, 233-241` | Memory Leak / NULL Pointer Dereference | 1 | `CONFIRMED` | `FIXED` | cleanup() function leaked fname VLS allocation on return, and realpath test did not check if rpath was NULL before comparing. |
|
||||
| `SEC-0094` | `src/libbu/tests/test_file_mime.c` | `45-56` | Unchecked Return Value / Array Bounds | 1 | `CONFIRMED` | `FIXED` | Did not check sscanf return count allowing uninitialized integer use, and allowed negative context index causing out-of-bounds array access. |
|
||||
| `SEC-0095` | `src/libbu/tests/test_observer.c` | `45-55` | NULL Pointer Dereference | 1 | `CONFIRMED` | `FIXED` | Missing NULL check on observer callback event structure pointer before dereferencing. |
|
||||
| `SEC-0096` | `src/libbu/tests/test_parallel_concurrency.cpp` | `40-48` | NULL Pointer Dereference | 1 | `CONFIRMED` | `FIXED` | Thread worker function dereferenced user data pointer without checking for NULL. |
|
||||
| `SEC-0097` | `src/libbu/tests/test_path_match.cpp` | `38-52` | Resource Leak / Empty String Check | 1 | `CONFIRMED` | `FIXED` | ifstream remained open without explicit close and empty lines were parsed without validation. |
|
||||
| `SEC-0098` | `src/libbu/realpath.c` | `20-27` | POSIX/Darwin API Resolution / Failure to Canonicalize | 2 | `CONFIRMED` | `FIXED` | Under strict POSIX/XOPEN flags on macOS without _DARWIN_C_SOURCE, realpath bound to legacy conformance symbol which failed with EPERM, breaking path canonicalization across libbu. |
|
||||
| `SEC-0099` | `src/libbu/tests/test_realpath.c` | `47-79` | Memory Management / Resource Leak | 2 | `CONFIRMED` | `FIXED` | Heap memory leak of allocated path string, unchecked sscanf return value, and potential NULL printf argument in test_realpath.c. |
|
||||
| `SEC-0100` | `src/libbu/tests/test_semaphore.c` | `48-62` | Memory Access / NULL Pointer Dereference | 1 | `CONFIRMED` | `FIXED` | Unchecked callback argument pargs in multi-threaded function increment_thread could lead to NULL pointer dereference. |
|
||||
| `SEC-0101` | `src/libbu/tests/test_semaphore_registry.cpp` | `60-63` | Memory Access / Out-of-bounds Read | 2 | `CONFIRMED` | `FIXED` | Unguarded argv[0] dereference passed to bu_setprogname when argv could be NULL or empty. |
|
||||
| `SEC-0102` | `src/libbu/tests/test_semchk.cpp` | `40-75` | Error Handling / Logic Error | 2 | `CONFIRMED` | `FIXED` | Undeclared identifier av[0] passed to bu_setprogname, unhandled file stream failure in process_file, and unguarded argv dereference. |
|
||||
| `SEC-0103` | `src/libbu/tests/test_snooze.c` | `44-48` | Memory Access / Out-of-bounds Read | 2 | `CONFIRMED` | `FIXED` | Unguarded argv[0] dereference passed to bu_setprogname when argv could be NULL or empty. |
|
||||
| `SEC-0104` | `src/libbu/tests/test_sort.c` | `45-95` | Integer Wraparound / Underflow | 1 | `CONFIRMED` | `FIXED` | Integer subtraction bug in comparison function comp_1 (*(unsigned int *)num1 - *(unsigned int *)num2) caused unsigned underflow and reversed sort order; comp_4 lacked NULL pointer checks; sscanf return was unchecked. |
|
||||
| `SEC-0105` | `src/libbu/tests/test_static_init.cpp` | `44-48` | Memory Access / Out-of-bounds Read | 2 | `CONFIRMED` | `FIXED` | Unguarded argv[0] dereference passed to bu_setprogname when argv could be NULL or empty. |
|
||||
| `SEC-0106` | `src/libbu/tests/test_str.c` | `115-180` | Memory Management / Resource Leak | 2 | `CONFIRMED` | `FIXED` | Memory leaks of allocated dst buffer across test_bu_strlcatm, test_bu_strlcpym, and test_bu_strdupm, unchecked sscanf, and negative integer cast to size_t. |
|
||||
| `SEC-0107` | `src/libbu/tests/test_str_isprint.c` | `70-98` | Format String / NULL Pointer Dereference | 2 | `CONFIRMED` | `FIXED` | Passing NULL string pointer to %10s format specifier in bu_log caused undefined behavior / crash; unchecked sscanf. |
|
||||
| `SEC-0108` | `src/libbu/tests/test_subprocess.cpp` | `45-55` | Uninitialized Memory Access | 2 | `CONFIRMED` | `FIXED` | Stack buffer char line[25] was uninitialized before std::cin.get(line, 25), leading to uninitialized memory read if stream was empty or in error state. |
|
||||
| `SEC-0109` | `src/libbu/tests/test_temp_filename.c` | `45-78` | Concurrency / Out-of-bounds Memory Access | 1 | `CONFIRMED` | `FIXED` | Passed &names (char ***) instead of names (char **) to bu_parallel, causing worker threads with cpu > 1 to read and write invalid stack memory outside the array; names[cpu - 1] caused underflow on cpu = 0; off-by-one heap allocation len + 1 caused string truncation. |
|
||||
| `SEC-0110` | `src/libbu/tests/test_units.c` | `48-58` | Memory Access / NULL Pointer Dereference | 2 | `CONFIRMED` | `FIXED` | Missing NULL pointer validation for csv and token in helper function units_csv_has_token. |
|
||||
| `SEC-0111` | `src/libbu/tests/test_uuid.c` | `55-90` | Logic Error / False-Pass Test Suite Flaw | 2 | `CONFIRMED` | `FIXED` | Typo in expected UUID string paired with inverted condition !bu_strcmp caused test suite to return 0 (PASS) on mismatch while returning 1 (FAIL) if it matched; missing error logging. |
|
||||
| `SEC-0112` | `src/libbu/tests/test_version.c` | `35-48` | Memory Access / Out-of-bounds Read | 2 | `CONFIRMED` | `FIXED` | Missing common.h include and unguarded av[0] dereference passed to bu_setprogname. |
|
||||
| `SEC-0113` | `src/libbu/tests/test_vlb.c` | `42-46` | Memory Access / Out-of-bounds Read | 2 | `CONFIRMED` | `FIXED` | Unguarded argv[0] dereference passed to bu_setprogname when argv could be NULL or empty. |
|
||||
| `SEC-0114` | `src/libbu/tests/test_vls.c` | `115-680` | Memory Management / Resource Leak | 2 | `CONFIRMED` | `FIXED` | Heap memory leaks across 13 test functions using bu_vls_strdup solely for comparison without freeing the returned string; out-of-bounds argv access in test_bu_vls_substr; unchecked sscanf. |
|
||||
| `SEC-0115` | `src/libbu/tests/test_vls_incr.c` | `58-85` | Input Validation / Integer Parsing | 2 | `CONFIRMED` | `FIXED` | Unguarded argv dereference and unvalidated strtol conversion where invalid characters or out-of-range counts were unhandled. |
|
||||
| `SEC-0116` | `src/libbu/tests/test_vls_incr_uniq.cpp` | `50-93` | Memory Management / Resource Leak | 2 | `CONFIRMED` | `FIXED` | Memory leak of struct bu_vls name on exit; heap allocation leak of std::set on early exit; potential NULL pointer dereference in StrCmp. |
|
||||
| `SEC-0117` | `src/libbu/tests/test_vls_simplify.c` | `56-85` | Memory Access / Out-of-bounds Read | 2 | `CONFIRMED` | `FIXED` | Unguarded argv dereference before bu_setprogname, potential NULL pointer dereference in bu_log format string. |
|
||||
| `SEC-0118` | `src/libbu/tests/test_vls_vprintf.c` | `55-175` | Buffer Overflow / Stack Vulnerability | 1 | `CONFIRMED` | `FIXED` | Unbounded vsprintf into fixed 1024-byte stack buffer buffer[1024] created an unconstrained stack buffer overflow vulnerability; unchecked sscanf and unguarded argv. |
|
||||
| `SEC-0119` | `src/libbn/anim.c` | `304-332` | Numerical Stability / NaN Generation | 1 | `CONFIRMED` | `FIXED` | anim_mat2quat negative square root NaN generation caused by floating-point rounding when testing !ZERO(square); passed minute negative numbers into sqrt() resulting in NaN quaternion components. |
|
||||
| `SEC-0120` | `src/libbn/anim.c` | `153-176` | Buffer Overflow | 1 | `CONFIRMED` | `FIXED` | anim_mat_printf stack buffer overflow risk with fixed 128-byte character buffer when formatting 16 double-precision float values with custom prefix strings. |
|
||||
| `SEC-0121` | `src/libbn/anim.c` | `180-680` | Null Pointer Dereference | 2 | `CONFIRMED` | `FIXED` | Missing NULL pointer checks across anim_mat_print, anim_dir2mat, anim_dirn2mat, anim_steer_mat, anim_v_permute, anim_v_unpermute, anim_tran, anim_mat2zyx, and anim_mat2ypr. |
|
||||
| `SEC-0122` | `src/libbn/complex.c` | `54-85` | Null Pointer Dereference | 2 | `CONFIRMED` | `FIXED` | bn_cx_div and bn_cx_sqrt dereferenced destination and operand pointers without validating against NULL. |
|
||||
| `SEC-0123` | `src/libbn/mat.c` | `1544-1578` | Stack Buffer Overflow | 1 | `CONFIRMED` | `FIXED` | bn_opt_mat looped up to argc when argc > 15, writing into fixed 16-element stack array fastf_t mtmp[16], overflowing the stack frame on excess arguments. |
|
||||
| `SEC-0124` | `src/libbn/mat.c` | `1500-1540` | Out-of-bounds Read | 1 | `CONFIRMED` | `FIXED` | bn_opt_mat out-of-bounds read when checking trailing closing brace with bu_vls_addr(&str)[bu_vls_strlen(&str)-1] without verifying bu_vls_strlen > 0. |
|
||||
| `SEC-0125` | `src/libbn/mat.c` | `80-140` | Buffer Overflow | 1 | `CONFIRMED` | `FIXED` | bn_mat_print_guts wrote into fixed obuf array without checking remaining capacity against bu_vls length, leading to potential buffer overflow. |
|
||||
| `SEC-0126` | `src/libbn/mat.c` | `1000-1060` | Concurrency Data Race / Logic Bug | 1 | `CONFIRMED` | `FIXED` | bn_wrt_point_direc declared transformation matrices as static local variables, causing data corruption across concurrent raytracing threads, and had inverted translation vector origin_to_pt. |
|
||||
| `SEC-0127` | `src/libbn/mat.c` | `1100-1200` | Division by Zero | 2 | `CONFIRMED` | `FIXED` | persp_mat and deering_persp_mat performed division by near_plane, right-left, and bottom-top without checking for zero denominators. |
|
||||
| `SEC-0128` | `src/libbn/msr.c` | `120-135` | Memory Access / Use-After-Free Prevention | 2 | `CONFIRMED` | `FIXED` | bn_gauss_free lacked NULL pointer guard and failed to clear magic identifier before freeing heap structure. |
|
||||
| `SEC-0129` | `src/libbn/mt19937ar.c` | `170-257` | Dead Code | 3 | `CONFIRMED` | `FIXED` | Dead #if 0 code block with test main function embedded within shared library source file. |
|
||||
| `SEC-0130` | `src/libbn/multipoly.c` | `80-101` | Heap Memory Corruption | 1 | `CONFIRMED` | `FIXED` | bn_multipoly_grow realloc corruption passing outer pointer array P->cf instead of row array P->cf[i] with sizeof(double*) instead of sizeof(double), overwriting row pointers with pointer array address. |
|
||||
| `SEC-0131` | `src/libbn/multipoly.c` | `80-101` | Out-of-bounds Access | 1 | `CONFIRMED` | `FIXED` | bn_multipoly_grow failed to update P->dgrs and P->dgrt dimensions after growing, leaving stale dimensions that caused subsequent operations to access out of bounds or fail to allocate. |
|
||||
| `SEC-0132` | `src/libbn/multipoly.c` | `120-132` | Out-of-bounds Read | 1 | `CONFIRMED` | `FIXED` | bn_multipoly_add out-of-bounds read when polynomials had differing degrees, reading beyond allocated row bounds, and dimension calculation typo Max(p1->dgrt, p2->dgrs) instead of p2->dgrt. |
|
||||
| `SEC-0133` | `src/libbn/multipoly.c` | `140-155` | Logic / Numerical Error | 1 | `CONFIRMED` | `FIXED` | bn_multipoly_mul overwrote accumulated product terms using = instead of +=, destroying earlier polynomial term contributions sharing identical combined powers. |
|
||||
| `SEC-0134` | `src/libbn/multipoly.c` | `70-75` | Resource Leak | 1 | `CONFIRMED` | `FIXED` | Missing bn_multipoly_free function causing 100% memory leak of all 2D dynamically allocated bivariate polynomial matrices. |
|
||||
| `SEC-0135` | `src/libbn/noise.c` | `248-430` | Null Pointer Dereference / Dead Code | 2 | `CONFIRMED` | `FIXED` | Missing NULL pointer validation on point and result in bn_noise_perlin, bn_noise_vec, and spectral functions; 22 lines of dead #if 0 code in bn_noise_mf. |
|
||||
| `SEC-0136` | `src/libbn/noise.c` | `460-545` | Out-of-bounds Access / Allocation Flaw | 1 | `CONFIRMED` | `FIXED` | build_spec_tbl and find_spec_wgt allowed negative or zero octaves, leading to invalid memory allocation size (int)(octaves+1) <= 0 and out-of-bounds weight table indexing. |
|
||||
| `SEC-0137` | `src/libbn/numgen.c` | `52-72` | Resource Leak / Typo | 1 | `CONFIRMED` | `FIXED` | bn_numgen_create allocated generator on the heap before validating dim > 0 and seed < 0, leaking the allocated structure on early return; nperiodic typo in flag check. |
|
||||
| `SEC-0138` | `src/libbn/poly.c` | `50-168` | Memory Corruption / Pointer Aliasing | 1 | `CONFIRMED` | `FIXED` | In-place pointer aliasing in bn_poly_mul, bn_poly_add, and bn_poly_sub when destination pointer equaled one of the operand polynomials caused coefficients to be overwritten before being read. |
|
||||
| `SEC-0139` | `src/libbn/poly.c` | `170-197` | Buffer Overflow / Unsigned Underflow | 1 | `CONFIRMED` | `FIXED` | bn_poly_synthetic_division assigned -1 to unsigned size_t quo->dgr when divisor degree exceeded dividend degree, underflowing to SIZE_MAX and triggering an unbounded loop writing past the 7-element coefficient array. |
|
||||
| `SEC-0140` | `src/libbn/poly.c` | `200-488` | Null Pointer Dereference | 2 | `CONFIRMED` | `FIXED` | Missing NULL pointer checks in bn_poly_quadratic_roots, bn_poly_cubic_roots, bn_poly_quartic_roots, bn_pr_poly, and bn_pr_roots. |
|
||||
| `SEC-0141` | `src/libbn/qmath.c` | `84-331` | Memory Access Violation / Numerical Robustness | 2 | `CONFIRMED` | `FIXED` | In quat_mat2quat, negative diagonal difference caused NaN and division-by-zero on non-orthogonal matrices; acos() called on unconstrained dot products causing NaN domain errors; missing NULL pointer checks across quaternion math operations. |
|
||||
| `SEC-0142` | `src/libbn/randsph.c` | `50-120` | Denial of Service / Memory Access Violation | 2 | `CONFIRMED` | `FIXED` | Potential infinite loop in _bn_unit_sph_sample when bn_randmt() yields exactly 0.5; possible NaN from sqrt(1 - S) when S slightly exceeds 1 due to floating-point rounding; unchecked return value from bn_sobol_next in _bn_unit_sph_sample_sobol. |
|
||||
| `SEC-0143` | `src/libbn/sobol.c` | `148-325` | Null Pointer Dereference | 2 | `CONFIRMED` | `FIXED` | bn_sobol_create did not check the return status of sobol_init, creating partially initialized structures with NULL member pointers when sdim was invalid; rightzero32 had undefined behavior if invoked with 0xffffffffU; _sobol_urand and bn_sobol_next lacked NULL pointer checks. |
|
||||
| `SEC-0144` | `src/libbn/sphmap.c` | `35-315` | Buffer Overflow / Resource Leak | 1 | `CONFIRMED` | `FIXED` | Heap buffer overflow in bn_spm_pix_load which allocated nx*nx*3 bytes instead of nx*ny*3 while reading nx*ny*3 bytes; permanent memory leak of buffer on fread failure; out-of-bounds array reads and writes in bn_spm_read, bn_spm_write, and bn_spm_get when u or v >= 1.0 or negative; bn_spm_free checked magic number before checking for NULL pointer. |
|
||||
| `SEC-0145` | `src/libbn/str.c` | `42-177` | Uninitialized Memory Read | 2 | `CONFIRMED` | `FIXED` | bn_decode_mat, bn_decode_quat, and bn_decode_vect copied uninitialized stack memory into destination buffers when sscanf matched fewer items than required or failed; missing NULL pointer checks across decode and encode routines. |
|
||||
| `SEC-0146` | `src/libbn/tabdata.c` | `35-1215` | Null Pointer Dereference / Resource Leak | 2 | `CONFIRMED` | `FIXED` | Second pass fopen in bn_read_table_and_tabdata was unchecked, causing NULL pointer dereference in bu_fgets if reopening failed; memory leak of allocated table/tabdata on read failure; unsigned integer underflow in bn_table_delete_sample_pnts when i > j; NULL pointer dereference in bn_table_free and bn_tabdata_free. |
|
||||
| `SEC-0147` | `src/libbn/ulp.c` | `118-204` | Undefined Behavior | 2 | `CONFIRMED` | `FIXED` | Referenced non-existent union member d in union flt_bits (val.d += 1 and minVal.d = 1 << 23); undefined behavior in signed 32-bit shift 1 << 52 when setting 64-bit exponent. |
|
||||
| `SEC-0148` | `src/libbn/wavelet.c` | `170-625` | Resource Leak | 1 | `CONFIRMED` | `FIXED` | Permanent memory leaks in make_wlt_haar_2d_decompose, make_wlt_haar_2d_reconstruct, and make_wlt_haar_2d_decompose2 when tbuffer/tbuf is NULL because allocated buffers were never freed; missing NULL buffer and zero dimension validation across wavelet routines. |
|
||||
| `SEC-0149` | `src/libbn/tests/test_util.c` | `48-265` | Null Pointer Dereference | 1 | `CONFIRMED` | `FIXED` | Missing NULL pointer checks in test helper and test dispatch functions (mat_close, vect_close, hvect_close, finite_vec, orthonormal_rotation, normalize_quat, make_table, make_tabdata, bn_api_single, and bn_api_dispatch) when called with NULL pointers or empty argument lists. |
|
||||
| `SEC-0150` | `src/libbg/pca.cpp` | `55-80` | Out-of-Bounds Read | 1 | `CONFIRMED` | `FIXED` | bg_pca computed Thin U on a 3xnpnts matrix using JacobiSVD. When npnts < 3, Thin U has fewer than 3 columns, causing out-of-bounds column reads and assertions when indexing svd.matrixU()(row, 1) and svd.matrixU()(row, 2). |
|
||||
| `SEC-0151` | `src/libbg/pointgen.c` | `35-60` | Logic / Format String Flaw | 2 | `CONFIRMED` | `FIXED` | bg_sph_sample referenced undeclared variable sample instead of pnts[i], used %d format specifier for size_t integers in bu_log, checked sample instead of center for translation offset, and lacked defensive NULL pointer validation on pnts. |
|
||||
| `SEC-0152` | `src/libbg/sat.cpp` | `44-175` | NULL Pointer Dereference | 2 | `CONFIRMED` | `FIXED` | bg_sat_line_aabb, bg_sat_line_obb, bg_sat_tri_aabb, bg_sat_tri_obb, bg_sat_aabb_obb, and bg_sat_obb_obb called v3_from_array and axis_and_extent_from_vect without verifying point_t and vect_t pointer arguments, leading to null pointer dereferences. |
|
||||
| `SEC-0153` | `src/libbg/lseg_lseg.cpp` | `37-45` | NULL Pointer Dereference | 2 | `CONFIRMED` | `FIXED` | bg_distsq_lseg3_lseg3 unpacked input point arrays without null pointer validation and lacked extern C linkage in its C++ definition. |
|
||||
| `SEC-0154` | `src/libbg/lseg_pt.cpp` | `36-45` | NULL Pointer Dereference | 2 | `CONFIRMED` | `FIXED` | bg_distsq_lseg3_pt indexed point coordinates without checking for null pointers. |
|
||||
| `SEC-0155` | `src/libbg/tri_pt.cpp` | `37-60` | NULL Pointer Dereference / Domain Error | 2 | `CONFIRMED` | `FIXED` | bg_tri_closest_pt indexed triangle vertices and sample points without null pointer checks and computed std::sqrt(result.sqrDistance) without non-negative clamping. |
|
||||
| `SEC-0156` | `src/libbg/tri_ray.cpp` | `43-70` | NULL Pointer Dereference | 2 | `CONFIRMED` | `FIXED` | intersect_triangle and vec3_from_array dereferenced point and vector arguments without checking for null pointers. |
|
||||
| `SEC-0157` | `src/libbg/util.c` | `50-145` | Divide by Zero / NULL Pointer Dereference | 2 | `CONFIRMED` | `FIXED` | coplanar_2d_coord_sys scaled origin by 1.0/n without verifying n >= 3, leading to division by zero if n <= 0 and undefined behavior for degenerate point sets. coplanar_3d_to_2d and coplanar_2d_to_3d lacked null checks on pointer parameters and count validation. |
|
||||
| `SEC-0158` | `src/libbg/aabb_ray.c` | `31-143` | NULL Pointer Dereference / Deprecated Keyword | 3 | `CONFIRMED` | `FIXED` | bg_ray_invdir lacked null check on dir; bg_isect_aabb_ray lacked null checks on invdir, aabb_min, aabb_max, and opt; wrote into *r_min and *r_max without verifying destination pointers were non-null; used deprecated register storage class keywords. |
|
||||
| `SEC-0159` | `src/libbg/obr.cpp` | `95-100` | Validation Flaw | 3 | `CONFIRMED` | `FIXED` | bg_3d_coplanar_obr accepted point count < 3 even though a 3D coplanar coordinate system requires at least 3 points to determine a plane normal. |
|
||||
| `SEC-0160` | `src/libbg/polygon.c` | `144-205` | Buffer Overflow / Stack Buffer Corruption & Divide by Zero | 1 | `CONFIRMED` | `FIXED` | Operator precedence flaw in bg_3d_polygon_centroid where *cent[1] and *cent[2] evaluate to *(cent[1]) and *(cent[2]), writing 24 and 48 bytes out of bounds past caller's point_t stack/heap memory; uninitialized accumulation; division by zero when polygon is perpendicular to XY or XZ projection planes. |
|
||||
| `SEC-0161` | `src/libbg/chull.c` | `50-185` | Out-of-bounds Read / Memory Leak | 2 | `CONFIRMED` | `FIXED` | Out-of-bounds read and negative deque index in bg_polyline_2d_chull when vertex count n < 3; permanent memory leaks in bg_3d_coplanar_chull of points_tmp and overwritten hull_2d pointer; missing NULL checks. |
|
||||
| `SEC-0162` | `src/libbg/chull2.cpp` | `50-230` | Out-of-bounds Read / Memory Leak | 2 | `CONFIRMED` | `FIXED` | Out-of-bounds read and negative deque index in bg_polyline_2d_chull2 for n < 3; permanent memory leak of polyline in bg_2d_chull2; missing NULL parameter checks. |
|
||||
| `SEC-0163` | `src/libbg/clip.c` | `60-140` | Divide by Zero / Thread-Safety Race Condition | 2 | `CONFIRMED` | `FIXED` | Division by zero in bg_lseg_clip for vertical or horizontal line segments; thread-safety race condition in bg_ray_vclip due to static local variables diff, sv, st, mindist, maxdist causing concurrent raytracing thread conflicts. |
|
||||
| `SEC-0164` | `src/libbg/polygon_triangulate.cpp` | `873-970` | Memory Leak / Unchecked Return Value | 2 | `CONFIRMED` | `FIXED` | Unchecked return value of fopen in bg_tri_plot_2d causing NULL pointer dereference; permanent memory leaks of holes_array container and tri_out_pts in bg_polygon_triangulate; missing validation on polygon contour points. |
|
||||
| `SEC-0165` | `src/libbg/tri_tri.c` | `180-715` | NULL Pointer Dereference | 2 | `CONFIRMED` | `FIXED` | bg_tri_tri_isect_with_line unconditionally wrote to *coplanar, *isectpt1, and *isectpt2 without verifying destination pointers were non-null; missing NULL vertex validation across all triangle-triangle intersection routines. |
|
||||
| `SEC-0166` | `src/libbg/polygon_op.cpp` | `45-470` | NULL Pointer Dereference / Divide by Zero | 2 | `CONFIRMED` | `FIXED` | Unchecked NULL pointer dereferences in bg_find_polygon_area, bg_polygons_overlap, load_polygon, and clipping routines; potential division by zero on zero scale factor. |
|
||||
| `SEC-0167` | `src/libbg/polygon_point_in.c` | `40-51` | Integer Underflow / Out-of-bounds Read | 2 | `CONFIRMED` | `FIXED` | bg_pnt_in_polygon underflows j = nvert - 1 when nvert == 0 and allows nvert < 3 which is geometrically invalid for polygons; missing NULL pointer checks on pnts and test. |
|
||||
| `SEC-0168` | `src/libbg/chull3d.cpp` | `115-210` | Out-of-bounds Read / Degenerate Buffer Access | 3 | `CONFIRMED` | `FIXED` | bg_3d_chull and bg_3d_chull2 did not check for empty vertexBuffer or undersized indexBuffer before allocating and indexing; out-of-bounds access in bg_3d_chull2 if face index exceeded vmap size. |
|
||||
| `SEC-0169` | `src/libbg/vert_tree.c` | `140-180, 260-430` | Spatial Partitioning Stride Corruption / Resource Leak | 3 | `CONFIRMED` | `FIXED` | Stride indexing corruption in bg_vert_tree_add_w_norm where vertex coordinate data was accessed with stride 3 instead of stride 6 (ptr->vleaf.index * 3 vs index * 6), causing spatial partitioning corruption and reading wrong coordinate/normal data; permanent memory leaks in bg_vert_tree_destroy which failed to free the_array when the_tree was NULL and failed to free the bg_vert_tree container structure. |
|
||||
| `SEC-0170` | `src/libbg/decimate.cpp` | `55-70, 160-175` | Truncated Integer Division / Overflow | 2 | `CONFIRMED` | `FIXED` | Truncated integer division in trimesh_decimate_simple (1/cbin.size()) where 1 / cbin.size() evaluated to integer 0 for any bin with >1 point, collapsing the point accumulator to world origin [0,0,0] instead of the bin centroid; missing n_ifaces integer overflow guard. |
|
||||
| `SEC-0171` | `src/libbg/delaunator.hpp` | `40-55, 240-305` | Out-of-bounds Read / Unhandled Exception | 2 | `CONFIRMED` | `FIXED` | Out-of-bounds vector read in sum() on empty vector (indexing x[0]); out-of-bounds vector read and crash in Delaunator constructor when n < 3 or when seed points i0 or i1 are uninitialized (accessing coords[2 * INVALID_INDEX]); unhandled exception in bg_polygon_triangulate when Delaunator encounters degenerate collinear input. |
|
||||
| `SEC-0172` | `src/libbg/ballpivot.cpp` | `30-75` | Unchecked Error Code / Parameter Validation | 2 | `CONFIRMED` | `FIXED` | Unchecked negative return code in bg_3d_ballpivot (if (nfaces == 0) instead of if (nfaces <= 0)), allowing negative face count to be passed into bg_trimesh_3d_gc; missing validation for radii_cnt < 0 or radii_cnt > 0 with NULL radii; missing initial NULL assignment to output pointers. |
|
||||
| `SEC-0173` | `src/libbg/RTree.h` | `465-480, 1740-1800` | Unchecked File Operation / Null Dereference | 1 | `CONFIRMED` | `FIXED` | Unchecked fopen() return value in RTree::plot() and RTree::plot2d() leading to NULL pointer dereference on file write failure; missing NULL check on filename in RTFileStream::OpenRead and RTFileStream::OpenWrite; unguarded VertexDataSource count on NULL pointer in QuickHull.hpp. |
|
||||
| `SEC-0174` | `src/libbg/polygon_triangulate.cpp` | `560-585` | Defensive Parameter Validation | 1 | `CONFIRMED` | `FIXED` | Missing parameter validation in bg_detria for faces, num_faces, poly, poly_pnts, pts, holes_array, holes_npts, and steiner, which could cause segmentation faults when called with NULL or undersized inputs. |
|
||||
| `SEC-0175` | `src/libbg/trimesh.cpp` | `368-379, 458-465, 754, 789` | Pointer Corruption / Memory Leak / Logic Error | 3 | `CONFIRMED` | `FIXED` | In get_unmatched_edges, &unmatched was passed instead of unmatched to bg_trimesh_unmatched_edges with bg_trimesh_edge_gather, corrupting pointer memory; unmatched->count was used uninitialized in bu_calloc; edge_list was leaked permanently. In bg_trimesh_hanging_nodes, unmatched was leaked on all paths and memcpy was undersized (num_edges * 2 bytes instead of num_edges * 2 * sizeof(int)). In bg_trimesh_solid, a false positive solid result occurred when unmatched edges were zero but misoriented or excess edges existed, leaking memory and passing NULL to memcpy. |
|
||||
| `SEC-0176` | `src/libbg/trimesh.cpp` | `812, 840-848, 876-878` | Out-of-Bounds Memory Access / Buffer Overflow | 2 | `CONFIRMED` | `FIXED` | Missing vertex index bounds validation in bg_trimesh_aabb, bg_trimesh_area, and bg_trimesh_volume allowed out-of-bounds reads into point array p and out-of-bounds writes into visit_vert bitvector when called with corrupted or invalid mesh face data. |
|
||||
| `SEC-0177` | `src/libbg/trimesh_diff.cpp` | `67-77, 206-255, 313-348` | Logic Error / Inverted Topology Map | 2 | `CONFIRMED` | `FIXED` | In bg_trimesh_diff, ind_map_1 and ind_map_2 inverted the mapping from original to sorted vertex indices (ind_map[i] = orig_ind instead of ind_map[orig_ind] = i), and tri_2 indexed with f1 instead of f2, ignoring mesh 2 face data; bg_trimesh_hash had the same mapping inversion and an early break in its minimum vertex search loop; dbl_clamp could trigger float overflow on non-positive tolerance. |
|
||||
| `SEC-0178` | `src/libbg/spsr.cpp` | `52-54, 105-178` | Unchecked Exception / Memory Leak / Input Validation | 2 | `CONFIRMED` | `FIXED` | In bg_3d_spsr, missing parameter validation on points, normals, and face pointers allowed NULL pointer dereferences; num_input_pnts < 3 caused solver failures; negative cnt in PtStream caused unsigned overflow; unhandled C++ exceptions escaping the extern C boundary leaked implicit solver memory and aborted the program. |
|
||||
| `SEC-0179` | `src/libbg/trimesh_isect.cpp` | `56-74, 95-245, trimesh_plot3.cpp:82, 351-372` | Unchecked File Operation / Null Pointer Dereference / Division by Zero | 2 | `CONFIRMED` | `FIXED` | In trimesh_isect.cpp, plot_faces called pl_color on unchecked fopen() return, causing NULL pointer dereference on file write failure; bg_trimesh_isect failed to validate vertex indices in faces_1 and faces_2 against vertex counts, risking OOB access, and never assigned output intersecting faces. In trimesh_plot3.cpp, pntset_2d_plot3 used bitwise OR (!p | !c); polyline_2d_plot3 allowed division by zero on scale <= 0.0 and loop condition i < xy.size() - 1 dropped the last vertex before closing. |
|
||||
| `SEC-0180` | `src/libbg/trimesh_remesh.cpp` | `82-87, trimesh_repair.cpp:126-131, trimesh_split.cpp:94-192, trimesh_sync.cpp:122` | Input Validation / Integer Overflow / Exception Safety | 1 | `CONFIRMED` | `FIXED` | Missing vertex index validation, integer overflow guards on face counts / allocation sizes, and unhandled C++ exceptions escaping extern C functions in bg_trimesh_remesh, bg_trimesh_repair, bg_trimesh_separate, bg_trimesh_split, and bg_trimesh_sync. |
|
||||
| `SEC-0181` | `src/libbg/GTE/Mathematics/TriMesh.h` | `208-212, 536-580, 595-650, 715-775` | Undefined Behavior / Data Loss / Out-of-Bounds Memory Access | 1 | `CONFIRMED` | `FIXED` | status(EdgeHandle e) used reinterpret_cast<EdgeStatus&> on std::vector<bool>::operator[] proxy bit-reference yielding undefined behavior; TriMesh::garbage_collection() wiped face connectivity before reading vertices destroying active geometry; multiple handle and iterator methods lacked index bounds validation. |
|
||||
| `SEC-0182` | `src/libbg/GTE/Mathematics/BotSmooth.h` | `85-115, BotSubdivide.h:48-95, 330-360` | Input Validation / Integer Overflow / Denial of Service | 2 | `CONFIRMED` | `FIXED` | Unchecked face vertex indices allowed out-of-bounds reads into vertex coordinate arrays in gte_bot_smooth and gte_bot_subdivide; unconstrained subdivision recursion levels allowed exponential memory allocation and integer overflow. |
|
||||
| `SEC-0183` | `src/libbg/GTE/Mathematics/LSCMParameterization.h` | `96-120, 160-220, 275-310` | Input Validation / Division by Zero / Matrix Solvability | 2 | `CONFIRMED` | `FIXED` | Missing vertex index bounds checking on boundaryIndices, interiorIndices, and triangle vertex references when indexing vertices3D in MapBoundaryToCircle and Parameterize; unchecked linear system matrix dimensions could lead to division by zero or invalid memory access in SolveSymmetricCG. |
|
||||
| `SEC-0184` | `src/libbg/GTE/Mathematics/MeshHoleFilling.h` | `275-320, 520-560, MeshPreprocessing.h:130-155, 225-255` | Out-of-Bounds Memory Access / Input Validation | 2 | `CONFIRMED` | `FIXED` | Unchecked triangle vertex indices allowed out-of-bounds reads in ComputeEarScore3D, ComputeTriangulationArea, TriangulateHoleLSCM, and MeshPreprocessing::ComputeTriangleArea / ComputeSignedVolume / RemoveSmallComponents. |
|
||||
| `SEC-0185` | `src/libbg/GTE/Mathematics/MeshQuality.h` | `230-236, MeshValidation.h:122-138, 220-250, MeshRepair.h:200-215, 430-495, 600-630, 990-1005` | Null Pointer Dereference / Out-of-Bounds Array Access | 3 | `CONFIRMED` | `FIXED` | MeshQuality::ComputeTriangleRaw lacked null pointer validation for raw vertex pointers; MeshValidation::HasSelfIntersections and TriangleBoxesOverlap lacked empty mesh and vertex index bounds validation; MeshRepair lacked vertex index bounds validation in computeTotalArea, DetectIsolatedVertices, ColocateVertices, RelativeOrientation, Dissociate, and RemoveIsolatedVertices. |
|
||||
| `SEC-0186` | `src/libbg/tests/polygon_op.c` | `55-80, 240-270` | Unsigned Integer Underflow / Out-of-Bounds Memory Access | 2 | `CONFIRMED` | `FIXED` | In _bg_polygon_diff, offset calculation size_t p2_ind = ((offset + j) >= c1->num_points) ? (j - offset) : (offset + j); produces an unsigned integer underflow when j < offset, wrapping p2_ind to SIZE_MAX and causing an out-of-bounds array access. In addition, unvalidated dcr2 dereferencing could crash on empty polygons, and plot_files contained a contour array dimension mismatch. |
|
||||
| `SEC-0187` | `src/libbg/tests/bgtester.c` | `85-115, 230-260` | Stack Buffer Overflow / Potential Null Pointer Dereference | 2 | `CONFIRMED` | `FIXED` | In parse_case, parameter arrays d, l, i, u were fixed 50-element stack buffers populated in a while loop without bounds checking, allowing stack buffer overflows on inputs exceeding 50 parameters. In main, token strings returned by strtok were dereferenced without checking for NULL. |
|
||||
| `SEC-0188` | `src/libbg/tests/chull.c` | `40-70, obr.c:45-75` | Null Pointer Dereference / Logical Indexing Flaw | 3 | `CONFIRMED` | `FIXED` | In plot2d_chull, plot_chull3d, and plot_obr, fopen results were passed directly to pl_color and fclose without NULL verification, risking null pointer crashes if file creation failed. Additionally, plot2d_chull indexed pnt_array[i][0] when closing the polygon loop instead of pnt_array[0][Y]. |
|
||||
| `SEC-0189` | `src/libbg/tests/plane_dist.c` | `35-50, lseg_pt.c:45-65, geogram_optimizer.cpp:55-80` | Division by Zero / Unchecked Parsing / Missing Pointer Validation | 3 | `CONFIRMED` | `FIXED` | In plane_dist.c, relative error calculation performed division by expected_return without checking for zero, resulting in division by zero (NaN/Inf). In lseg_pt.c, sscanf return counts were unchecked, allowing uninitialized stack values to be used. In geogram_optimizer.cpp, converged_optimizer was dereferenced without checking for NULL. |
|
||||
| `SEC-0190` | `src/libbg/tests/poly2tri.c` | `110-180, chull.c:120-170, chull3d.c:70-130` | Resource Leak / Memory Management | 3 | `CONFIRMED` | `FIXED` | Dynamically allocated vertex, face, hole, and output polygon arrays allocated via bu_calloc/bu_malloc in poly2tri.c, chull.c, and chull3d.c were never freed prior to test completion or return, resulting in systematic memory leaks. |
|
||||
| `SEC-0191` | `src/libbg/tests/polygon_triangulate.c` | `48-62, 134-150, 184-192, 225-237, 269-281, 298-306` | Resource Leak / Null Pointer Dereference | 3 | `CONFIRMED` | `FIXED` | Dynamically allocated face index arrays allocated by bg_poly_triangulate and bg_nested_poly_triangulate across all five test cases were never released via bu_free prior to block exit, causing memory leaks. In addition, _tess_report lacked validation guarding against NULL face and point arrays. |
|
||||
| `SEC-0192` | `src/libbg/tests/tri_ray_isect.cpp` | `44-64, tri_tri_isect_coplanar.cpp:41-61` | Out-of-Bounds Substring / Unchecked Pointer Dereference | 2 | `CONFIRMED` | `FIXED` | In read_point(), if an empty or whitespace-only argument was supplied, find_first_not_of returned std::string::npos, causing substr(sp, ep-sp+1) to throw an unhandled std::out_of_range exception. Additionally, input pointers p and arg were not validated before use, and sscanf return values in main were unchecked. |
|
||||
| `SEC-0193` | `src/libbg/tests/tri_tri_isect.c` | `31-66, tri_closest_pt.c:43-53` | Uninitialized Stack Memory / Unchecked Input Parsing | 3 | `CONFIRMED` | `FIXED` | In tri_tri_isect.c, stack variables f1 and f2 were left uninitialized in declaration float f1, f2, f3 = 0.0;, and sscanf return counts were unchecked across all coordinate arguments in tri_tri_isect.c and tri_closest_pt.c, risking calculation using uninitialized stack coordinates upon malformed input. |
|
||||
| `SEC-0194` | `src/libbg/tests/trimesh_sync.c` | `109-130, tri_area.c:49-53` | Null Pointer Dereference Guard / Code Quality | 3 | `CONFIRMED` | `FIXED` | In trimesh_sync.c, error reporting function parrays() dereferenced ff and ctrl pointers without verifying that they were non-NULL, risking null pointer dereferences during error handling. In tri_area.c, an extraneous duplicate semicolon was cleaned up. |
|
||||
| `SEC-0195` | `src/libbg/geogram/NL/nl_matrix.c` | `765-780` | Out-of-Bounds Memory Access / Buffer Overflow | 2 | `CONFIRMED` | `FIXED` | In nlSparseMatrixConstruct, the row array was allocated with capacity m (NL_NEW_ARRAY(NLRowColumn, m)), but the row initialization loop mistakenly iterated up to n (for (i=0; i<n; i++)). If the column count n exceeded the row count m, this resulted in an out-of-bounds write past the allocated row buffer; if n < m, rows from n to m-1 remained uninitialized. |
|
||||
| `SEC-0196` | `src/libbg/geogram/NL/nl_matrix.c` | `132-143` | Logic Error / Broken Comparator | 1 | `CONFIRMED` | `FIXED` | In nlCoeffCompare, the comparator callback returned (((NLCoeff*)(p2))->index < ((NLCoeff*)(p1))->index), returning only 0 or 1. It violated strict weak ordering required by qsort/bu_sort (never returning negative values when p1 < p2), risking non-deterministic sort order or sorting anomalies. |
|
||||
| `SEC-0197` | `src/libbg/geogram/NL/nl_blas.c` | `1440-1455, 1495-1510` | Format String / Type Mismatch & Division by Zero | 2 | `CONFIRMED` | `FIXED` | In host_blas_show_stats, nlBlasGFlops() returns a double, but was passed to nl_printf using %d format specifier, risking register/stack corruption on 64-bit platforms. Furthermore, nlBlasGFlops() divided by elapsed_time without checking for zero elapsed time. |
|
||||
| `SEC-0198` | `src/libbg/geogram/NL/nl_api.c, src/libbg/geogram/NL/nl_preconditioners.c` | `nl_api.c:660-675, nl_preconditioners.c:110-130, 215-265` | Divide-by-Zero / Floating Point Exception | 2 | `CONFIRMED` | `FIXED` | In nlNormalizeRow, the normalization divided by vector norm without checking if the norm was zero, leading to division by zero on degenerate rows. In Jacobi and SSOR preconditioners (nlNewJacobiPreconditioner, nlSparseMatrixMultLowerInverse, nlSparseMatrixMultUpperInverse), diagonal entries were divided without guards against zero diagonal entries. |
|
||||
| `SEC-0199` | `src/libbg/geogram/NL/nl_private.h, src/libbg/geogram/NL/nl_os.c, src/libbg/geogram/NL/nl_amgcl.cpp` | `nl_private.h:288-300, nl_os.c:55-135, nl_amgcl.cpp:178-195` | Macro Hazard / Null Pointer Dereference Guard | 1 | `CONFIRMED` | `FIXED` | NL_DELETE and NL_DELETE_ARRAY macros expanded to multiple unbracketed statements (free(x); x = NULL), creating dangerous syntax and logic errors when used inside unbraced single-line conditionals. Error reporting and assertion handlers in nl_os.c lacked NULL checks on function pointers and format arguments. AMGCL solver interface in nl_amgcl.cpp lacked NULL checks on context, matrices, and vectors. |
|
||||
| `SEC-0200` | `src/libbg/geogram/basic/attributes.cpp` | `390-405` | Buffer Overflow / Logic Error in Dimension Check | 3 | `CONFIRMED` | `FIXED` | In AttributesManager::copy_attribute, the compatibility check between existing attribute and destination attribute tested if ((store->size() != new_store->size()) && (store->dimension() != new_store->dimension()) && (store->element_size() != new_store->element_size())) using logical AND (&&) instead of logical OR (||). If the attributes had matching dimensions but differing element counts, the condition evaluated to false, allowing memcpy to copy an oversized source buffer into an undersized destination buffer, causing a critical heap buffer overflow. |
|
||||
| `SEC-0201` | `src/libbg/geogram/basic/thread_sync.h` | `150-227` | Memory Leak / Missing Destructor & Dangling Pointer | 2 | `CONFIRMED` | `FIXED` | BasicSpinLockArray allocated heap memory via new spinlock[size_in], but lacked a destructor (~BasicSpinLockArray()), causing all allocated spinlock arrays to be leaked upon destruction. Furthermore, BasicSpinLockArray::clear() deleted the array without resetting size_ to 0 or spinlocks_ to nullptr, and CompactSpinLockArray::clear() did not reset spinlocks_ to nullptr, leaving dangling pointers. |
|
||||
| `SEC-0202` | `src/libbg/geogram/basic/packed_arrays.cpp, src/libbg/geogram/basic/packed_arrays.h` | `packed_arrays.cpp:90-185, packed_arrays.h:160-165` | Memory Management Flaw / Out-of-Bounds Read & Write | 2 | `CONFIRMED` | `FIXED` | In PackedArrays, calloc return values were not checked for allocation failure. In resize_array, realloc(ZV_[array_index], 0) was invoked when shrinking to <= Z1_block_size_, risking platform-dependent memory leaks or undefined behavior, and the realloc return was directly assigned without failure handling. Array accessors (get_array, set_array, resize_array, array_size) lacked bounds checks on array_index in release mode. |
|
||||
| `SEC-0203` | `src/libbg/geogram/basic/parallel.cpp, src/libbg/geogram/basic/permutation.h, src/libbg/geogram/basic/attributes.cpp` | `parallel.cpp:67-85, permutation.h:158-240, attributes.cpp:160-180` | Integer Underflow & Unbounded Stack Allocation | 2 | `CONFIRMED` | `FIXED` | In parallel_for, if from >= to, unsigned integer subtraction to - from underflowed to a massive positive number (~4 billion), causing thread spawning loops with out-of-bounds tasks. In Permutation::apply and AttributeStore::swap_items, BRLCAD_ALLOCA was invoked unconditionally on element sizes, risking stack overflow on large elements. In Permutation::apply(vector<T>&, ...), mismatch between data size and permutation size was not checked, violating documented contract and causing out-of-bounds access. |
|
||||
| `SEC-0204` | `src/libbg/geogram/basic/assert.h, src/libbg/geogram/basic/memory.h, src/libbg/geogram/basic/geometry_nd.h, src/libbg/geogram/basic/rationalg.h, src/libbg/geogram/basic/vecg.h` | `assert.h:145-215, memory.h:390-485, geometry_nd.h:215-295, rationalg.h:540-550, vecg.h:180-195` | Macro Precedence Hazards & Divide-by-Zero / Floating-Point Exception | 1 | `CONFIRMED` | `FIXED` | Assertions in assert.h were defined with raw braces { ... } rather than do { ... } while(0), causing dangling-else and syntax errors in conditional contexts. geo_aligned_alloca macro parameter was unparenthesized. Memory::aligned_allocator::allocate lacked integer overflow check on size * sizeof(T). triangle_area lacked max(A2, 0.0) guard causing sqrt(negative) NaNs, and triangle_circumcenter divided by determinant without zero check. rationalg::estimate() divided by denominator without zero check. vecng initializer_list constructor lacked bounds check on iteration count. |
|
||||
| `SEC-0205` | `src/libbg/geogram/mesh/index.h, src/libbg/geogram/mesh/mesh.h, src/libbg/geogram/mesh/mesh.cpp` | `index.h:70-130, mesh.h:200-475, mesh.cpp:115-460` | Out-of-Bounds Memory Access & Integer Overflow | 2 | `CONFIRMED` | `FIXED` | In MeshCells::pop(), cell_ptr_[nb()-1] was accessed unconditionally; simplicial meshes store an empty or single-element cell_ptr_, resulting in heap out-of-bounds reads. In MeshVertices::copy, point_ptr(0) was called when rhs.nb() == 0, accessing beyond empty buffers. In Mesh::get_subelements_by_type and get_subelements_by_index, invalid queries dereferenced null pointers *(MeshSubElementsStore*)nullptr. Index classes left buffer arrays uninitialized in default constructors. create_sub_elements and reserve lacked integer multiplication overflow guards. In connect_tets and connect, corrupt facet/cell vertex indices were not validated against vertices_.nb(). |
|
||||
| `SEC-0206` | `src/libbg/geogram/mesh/mesh_AABB.h, src/libbg/geogram/mesh/mesh_AABB.cpp` | `mesh_AABB.h:45-1250, mesh_AABB.cpp:35-180` | Divide-by-Zero & Out-of-Bounds Vector Access | 2 | `CONFIRMED` | `FIXED` | In ray_triangle_intersection, 1.0 / det was calculated prior to checking whether fabs(det) >= 1e-20, causing floating-point division by zero and NaN/Inf propagation on rays coplanar to triangle planes. Querying or intersecting AABB trees built on empty meshes (nb() == 0) accessed bboxes_[1] out-of-bounds and caused infinite recursion in max_node_index. |
|
||||
| `SEC-0207` | `src/libbg/geogram/mesh/mesh_geometry.h, src/libbg/geogram/mesh/mesh_geometry.cpp, src/libbg/geogram/mesh/mesh_halfedges.cpp` | `mesh_geometry.h:210-240, mesh_geometry.cpp:80-160, mesh_halfedges.cpp:60-145` | Divide-by-Zero & Denial of Service / Process Abort | 1 | `CONFIRMED` | `FIXED` | mesh_facet_center and mesh_cell_center divided by corner/vertex counts without checking for empty facets/cells (0 count). In mesh_geometry.cpp, normalize was called on zero vectors, and bounding box functions did not validate null output pointers or zero-vertex meshes. In MeshHalfedges, border and vertex traversals on non-manifold or cyclical meshes aborted the process via geo_assert_not_reached or geo_assert(count < 10000) instead of gracefully failing. |
|
||||
| `SEC-0208` | `src/libbg/geogram/mesh/mesh_repair.cpp, src/libbg/geogram/mesh/mesh_preprocessing.h, src/libbg/geogram/mesh/mesh_preprocessing.cpp, src/libbg/geogram/mesh/mesh_topology.cpp` | `mesh_repair.cpp:65-175, 490-590, 665-685, 820-840, 920-1010, 1145-1215; mesh_preprocessing.h:77; mesh_preprocessing.cpp:65-135; mesh_topology.cpp:48-105` | Out-of-Bounds Memory Access, Stack Exhaustion & Process Abort | 2 | `CONFIRMED` | `FIXED` | In repair_connect_facets, v2c[v1], c2f[c2], and next_c_around_v[c] were indexed without validating vertex/corner indices against mesh element counts, causing out-of-bounds array reads. facet_is_degenerate and normalize_facet_vertices_order performed unbounded BRLCAD_ALLOCA stack allocations for vertex arrays on arbitrary polygonal facets without heap fallback, causing stack overflow vulnerabilities. find_corner, repair_propagate_orientation, and SimplePriorityQueue::pop aborted the process on malformed topological meshes via geo_assert_not_reached. mesh_colocate_vertices_no_check indexed old2new without bounds checks. In mesh_preprocessing.cpp and mesh_topology.cpp, empty meshes or unbound attributes resulted in out-of-bounds indexing in component traversal and signed volume calculation. |
|
||||
| `SEC-0209` | `src/libbg/geogram/mesh/mesh_reorder.cpp, src/libbg/geogram/mesh/mesh_remesh.cpp` | `mesh_reorder.cpp:280-295, 430-445, 570-585, 935-945, 1115-1175; mesh_remesh.cpp:75-80, 125-140, 150-165, 205-255, 285-295, 470-505` | Divide-by-Zero & Out-of-Bounds Buffer Indexing | 2 | `CONFIRMED` | `FIXED` | In mesh_reorder.cpp, Base_fcmp::center and Base_ccmp::center computed 1.0 / double(nb_vertices) without checking nb_vertices == 0, causing floating-point division by zero; Base_tcmp accessed 4 cell vertices without validating vertex count. In mesh_remesh.cpp, remesh_smooth and mesh_adjust_surface crashed or had undefined behavior on empty meshes or meshes with dimension < 3; mesh_adjust_surface divided by double(d) on facets with 0 vertices; create_ribbon_on_border called normalize on zero-length normal vectors, causing NaNs. |
|
||||
| `SEC-0210` | `src/libbg/geogram/mesh/mesh_sampling.h` | `mesh_sampling.h:68-95, 120-165, 215-265, 285-335` | Divide-by-Zero & Buffer Overflow | 2 | `CONFIRMED` | `FIXED` | In mesh_generate_random_samples_on_surface and mesh_generate_random_samples_in_volume, division by total area (Atot) and total volume (Vtot) occurred without checking Atot <= 0.0 or Vtot <= 0.0, resulting in division by zero and NaN sample coordinates on degenerate meshes. mesh_facet_mass and mesh_tetra_mass lacked bounds checking on facet/cell vertex counts and attribute arrays, potentially reading out of bounds. |
|
||||
| `SEC-0211` | `src/libbg/geogram/delaunay/delaunay.cpp, src/libbg/geogram/delaunay/delaunay.h` | `delaunay.cpp:115-180, 245-290; delaunay.h:200-245` | Out-of-Bounds Memory Access & Assertion Abort | 2 | `CONFIRMED` | `FIXED` | In delaunay.cpp (update_v_to_cell, update_cicl, get_neighbors_internal, save_histogram), missing bounds checks on vertex and cell indices allowed out-of-bounds writes to v_to_cell_ and cicl_ on corrupted mesh topology or NO_INDEX vertices. In save_histogram, an off-by-one check (histogram.size() <= N instead of < N) allowed out-of-bounds array writes. In delaunay.h, geo_assert_not_reached() was called on unlinked cells causing process crashes instead of graceful failure. |
|
||||
| `SEC-0212` | `src/libbg/geogram/delaunay/delaunay_nn.cpp` | `delaunay_nn.cpp:120-195, 230-310` | Stack Exhaustion & Unbounded Allocation | 2 | `CONFIRMED` | `FIXED` | In delaunay_nn.cpp (enlarge_neighborhood, store_neighbors_CB, get_neighbors_internal), unbounded BRLCAD_ALLOCA was used for neighbor candidate and distance arrays proportional to requested neighbor counts. High neighbor counts or deep recursion could exhaust thread call stacks causing stack overflow crashes. Additionally, float equality comparison against 0.0 triggered compiler warnings. |
|
||||
| `SEC-0213` | `src/libbg/geogram/points/colocate.cpp` | `colocate.cpp:85-150` | Stack Exhaustion & Unbounded Allocation | 2 | `CONFIRMED` | `FIXED` | In Colocate::find_nearest_neighbors, unbounded BRLCAD_ALLOCA was invoked per point for neighbor query arrays based on requested neighbor counts, creating risk of stack overflow on large neighbor queries. |
|
||||
| `SEC-0214` | `src/libbg/geogram/points/kd_tree.cpp, src/libbg/geogram/points/kd_tree.h` | `kd_tree.h:110-145; kd_tree.cpp:180-260, 410-480, 520-600` | Uninitialized Memory, Out-of-Bounds Access & Infinite Recursion | 3 | `CONFIRMED` | `FIXED` | In kd_tree.h, KdTree::NearestNeighbors constructor initialized loop condition with nb_neighbors (which was 0) instead of nb_neighbors_max, leaving neighbor index and distance arrays uninitialized and leaking memory to user callers via copy_to_user(). In kd_tree.cpp, AdaptiveKdTree::split_kd_node failed to clamp split point m, resulting in child nodes duplicating parent intervals [b, e) and causing infinite recursion and call stack exhaustion. KdTree::get_nearest_neighbors_leaf used fixed-size stack arrays local_idx[MAX_LEAF_SIZE] without checking e - b <= MAX_LEAF_SIZE. BalancedKdTree::get_node and AdaptiveKdTree::get_node lacked bounds checks on node index n. |
|
||||
| `SEC-0215` | `src/libbg/geogram/points/nn_search.cpp, src/libbg/geogram/points/nn_search.h` | `nn_search.h:70-90; nn_search.cpp:45-75` | Out-of-Bounds Access & Assertion Abort | 2 | `CONFIRMED` | `FIXED` | In nn_search.cpp (get_nearest_neighbors), query point index q_index was not validated against nb_points(), risking out-of-bounds point access. In nn_search.h (get_nearest_neighbor), geo_assert(result < nb_points()) triggered process abort when no neighbors were found on empty point sets instead of returning NO_INDEX. |
|
||||
| `SEC-0216` | `src/libbg/geogram/numerics/multi_precision.cpp, src/libbg/geogram/numerics/multi_precision.h` | `multi_precision.h:115-125; multi_precision.cpp:80-145, 595-610` | Memory Corruption & Heap Buffer Under-Allocation | 3 | `CONFIRMED` | `FIXED` | In multi_precision.cpp, Pools::malloc, Pools::free, and Pools::new_chunk assumed item_size was at least sizeof(Memory::pointer), but for item_size < sizeof(void*) on 64-bit systems, casting chunk memory to Memory::pointer* wrote 8 bytes into smaller slots (such as 4-byte expansion headers), causing heap metadata and adjacent block corruption. In Pools::free, null pointer dereferences were not guarded. In Pools::new_chunk, raw allocation without try-catch risked inconsistent pool state on allocation failure. In multi_precision.h, expansion_allocator::bytes(capa) calculated byte requirements using unchecked 32-bit arithmetic, risking integer overflow on large capacities. |
|
||||
| `SEC-0217` | `src/libbg/geogram/numerics/multi_precision.cpp` | `multi_precision.cpp:215-230, 240-275, 305-330, 680-720` | Out-of-Bounds Memory Access & Integer Underflow | 2 | `CONFIRMED` | `FIXED` | In multi_precision.cpp, compress_expansion performed index arithmetic m - 1 without verifying e.length() > 1. For length 0 or 1, m underflowed to 0xFFFFFFFF, resulting in massive out-of-bounds heap reads and writes. In scale_expansion_zeroelim, fast_expansion_sum_zeroelim, and fast_expansion_diff_zeroelim, expansions were accessed at index 0 without checking for zero-length inputs, reading uninitialized or unallocated heap memory. In assign_sq_dist and assign_dot_at, coordinate dimension dim == 0 caused underflow dim - 1 and unbounded recursion. |
|
||||
| `SEC-0218` | `src/libbg/geogram/numerics/predicates.cpp, src/libbg/geogram/numerics/PCK.h` | `PCK.h:170-175; predicates.cpp:445-460, 620-635, 960-975, 1130-1145, 1395-1410, 1535-1550` | Assertion Failure Denial-of-Service Crashes | 2 | `CONFIRMED` | `FIXED` | In predicates.cpp, exact predicate implementations asserted that primary determinant minors were non-zero (geo_assert(Delta_sign != ZERO)). When degenerate, collinear, or coplanar input configurations occurred, these assertions aborted the process via SIGABRT instead of gracefully returning ZERO or falling back to symbolic perturbation. In PCK.h, SOS() macro asserted geo_assert_not_reached on invalid SOSMode instead of gracefully returning ZERO. |
|
||||
| `SEC-0219` | `src/libbg/geogram/numerics/predicates.cpp, src/libbg/geogram/numerics/predicates.h, src/libbg/geogram/numerics/PCK.cpp` | `PCK.cpp:25-35; predicates.h:260-275; predicates.cpp:1640-2260` | Mathematical Logic Flaw & Missing Pointer Validation | 2 | `CONFIRMED` | `FIXED` | In predicates.cpp (PCK::dot_3d), det_3d_filter(p0, p1, p2) was erroneously invoked instead of dot_3d_filter(p0, p1, p2), returning the sign of a 3x3 determinant rather than the dot product whenever the determinant filter succeeded. Across predicates.cpp and predicates.h, geometric predicate functions lacked null pointer checks for double* coordinate arrays, causing segmentation faults on null pointers. In PCK.cpp, percent(a, b) lacked division-by-zero protection when b == 0. |
|
||||
| `SEC-0220` | `src/libbg/geogram/voronoi/RVD.cpp` | `1754-1775, 1810-1855, 2480-2500, 2535-2587` | Use-After-Free / Dangling Pointer & Missing Null Validation | 3 | `CONFIRMED` | `FIXED` | In prepare_projection(), mesh_vertices_ held a raw pointer to a local vector<double> destroyed upon function return, causing project_points_on_surface() to read through a dangling pointer (use-after-free). In RestrictedVoronoiDiagram::create, delaunay was dereferenced prior to checking for null pointer. |
|
||||
| `SEC-0221` | `src/libbg/geogram/voronoi/generic_RVD_utils.h, src/libbg/geogram/voronoi/generic_RVD_vertex.h` | `generic_RVD_utils.h:45-55, 275-290, 345-385; generic_RVD_vertex.h:175-195, 240-260, 270-300, 725-770` | Buffer Overflow, Integer Shift Overflow, Unchecked Realloc & Vector Stack Underflow | 2 | `CONFIRMED` | `FIXED` | In generic_RVD_utils.h, VectorStack::pop() called pop_back() on empty vectors causing out-of-bounds underflow; array_capacity computed 1 << (result - 1) with 32-bit signed shift that overflowed on large capacities; and insert() directly reassigned realloc return pointers without failure validation. In generic_RVD_vertex.h, small_set appended past capacity DIM without bounds checks; PointAllocator lacked chunk allocation failure handling and bounds checks. |
|
||||
| `SEC-0222` | `src/libbg/geogram/voronoi/generic_RVD_cell.cpp, src/libbg/geogram/voronoi/generic_RVD_polygon.cpp, src/libbg/geogram/voronoi/RVD_callback.cpp, src/libbg/geogram/voronoi/RVD.cpp` | `generic_RVD_cell.cpp:635-645, 1020-1040; generic_RVD_polygon.cpp:520-530; RVD_callback.cpp:80-95; RVD.cpp:1620-1695, 2410-2420, 2580-2585` | Denial-of-Service Assertion Aborts & Unchecked Pointer Dereferences | 2 | `CONFIRMED` | `FIXED` | In side_exact, initialize_from_surface_mesh, triangulate_polygon, run_thread, and RestrictedVoronoiDiagram::create, assertions geo_assert and geo_assert_not_reached were triggered on non-simplex facets, unexpected topology, or unhandled dimensions, terminating the process via SIGABRT. |
|
||||
| `SEC-0223` | `src/libbg/geogram/voronoi/CVT.cpp, src/libbg/geogram/voronoi/CVT.h` | `CVT.h:120-140, 195-215; CVT.cpp:60-80, 135-155, 175-195, 230-260, 310-340, 360-390` | Out-of-Bounds Access, Missing Null Guards & Zero Division | 2 | `CONFIRMED` | `FIXED` | In CVT.cpp and CVT.h, constructors and member methods accepted Mesh* and double* pointers without null validation, accessed empty embedding vectors, and performed unvalidated indexing and division when dimension_ or point counts were zero. |
|
||||
| `SEC-0224` | `src/libbg/geogram/third_party/LBFGSpp/include/LBFGS.h, src/libbg/geogram/third_party/LBFGSpp/include/LBFGSB.h, src/libbg/geogram/third_party/LBFGSpp/include/LBFGSpp/BFGSMat.h, src/libbg/geogram/third_party/LBFGSpp/include/LBFGSpp/BKLDLT.h, src/libbg/geogram/third_party/LBFGSpp/include/LBFGSpp/Cauchy.h, src/libbg/geogram/third_party/LBFGSpp/include/LBFGSpp/LineSearchBacktracking.h, src/libbg/geogram/third_party/LBFGSpp/include/LBFGSpp/LineSearchBracketing.h, src/libbg/geogram/third_party/LBFGSpp/include/LBFGSpp/LineSearchMoreThuente.h, src/libbg/geogram/third_party/LBFGSpp/include/LBFGSpp/LineSearchNocedalWright.h, src/libbg/geogram/third_party/LBFGSpp/include/LBFGSpp/Param.h, src/libbg/geogram/third_party/LBFGSpp/include/LBFGSpp/SubspaceMin.h` | `LBFGS.h:170-175, 230-240; LBFGSB.h:205-215; BFGSMat.h:115-125, 270-340, 480-505; BKLDLT.h:80-95, 125-140, 160-175; Cauchy.h:120-145, 175-190; LineSearchMoreThuente.h:34-55, 71-125; LineSearchNocedalWright.h:42-50, 94-98; Param.h:210, 368; SubspaceMin.h:44-58, 134-138` | Division by Zero, Out-of-bounds Vector Access & Dimension Validation | 2 | `CONFIRMED` | `FIXED` | In LBFGSpp optimization routines, missing zero guards on matrix determinants, Hessian eigenvalues, line search denominators, and empty input vector dimensions allowed potential divisions by zero, infinite loops, and out-of-bounds array access on degenerate or singular optimization problems. |
|
||||
| `SEC-0225` | `src/libbg/geogram/third_party/amgcl/amgcl/adapter/zero_copy.hpp, src/libbg/geogram/third_party/amgcl/amgcl/amg.hpp, src/libbg/geogram/third_party/amgcl/amgcl/backend/builtin.hpp, src/libbg/geogram/third_party/amgcl/amgcl/backend/detail/matrix_ops.hpp, src/libbg/geogram/third_party/amgcl/amgcl/backend/interface.hpp, src/libbg/geogram/third_party/amgcl/amgcl/coarsening/detail/galerkin.hpp, src/libbg/geogram/third_party/amgcl/amgcl/coarsening/plain_aggregates.hpp, src/libbg/geogram/third_party/amgcl/amgcl/coarsening/pointwise_aggregates.hpp, src/libbg/geogram/third_party/amgcl/amgcl/coarsening/smoothed_aggr_emin.hpp, src/libbg/geogram/third_party/amgcl/amgcl/coarsening/smoothed_aggregation.hpp, src/libbg/geogram/third_party/amgcl/amgcl/coarsening/tentative_prolongation.hpp, src/libbg/geogram/third_party/amgcl/amgcl/detail/inverse.hpp, src/libbg/geogram/third_party/amgcl/amgcl/detail/qr.hpp, src/libbg/geogram/third_party/amgcl/amgcl/detail/sort_row.hpp, src/libbg/geogram/third_party/amgcl/amgcl/detail/spgemm.hpp, src/libbg/geogram/third_party/amgcl/amgcl/make_solver.hpp, src/libbg/geogram/third_party/amgcl/amgcl/preconditioner/dummy.hpp, src/libbg/geogram/third_party/amgcl/amgcl/relaxation/spai0.hpp, src/libbg/geogram/third_party/amgcl/amgcl/reorder/cuthill_mckee.hpp, src/libbg/geogram/third_party/amgcl/amgcl/solver/cg.hpp, src/libbg/geogram/third_party/amgcl/amgcl/solver/skyline_lu.hpp, src/libbg/geogram/third_party/amgcl/amgcl/util.hpp, src/libbg/geogram/third_party/amgcl/amgcl/value_type/interface.hpp` | `zero_copy.hpp:95-105; amg.hpp:145-180, 205-220; builtin.hpp:170-195, 410-440, 520-565; matrix_ops.hpp:75-95; interface.hpp:85-95; galerkin.hpp:60-70; plain_aggregates.hpp:115-130, 160-198; pointwise_aggregates.hpp:80-140, 150-178; smoothed_aggr_emin.hpp:90-100, 170-220, 255-345; smoothed_aggregation.hpp:120-165, 190-220; tentative_prolongation.hpp:50-60, 95-175; inverse.hpp:45-75; qr.hpp:155-205, 385-405, 580-600; sort_row.hpp:35-45; spgemm.hpp:70-125, 425-460; make_solver.hpp:88-100; dummy.hpp:80-105; spai0.hpp:75-115; cuthill_mckee.hpp:80-165; cg.hpp:145-205; skyline_lu.hpp:100-175, 185-255; util.hpp:205-225; interface.hpp:145-155` | Out-of-bounds Array Access, Null Dereference, Division by Zero & Traversal Flaw | 2 | `CONFIRMED` | `FIXED` | In AMGCL solver and preconditioner routines, missing bounds checks on row/column indices and negative aggregate IDs allowed out-of-bounds array reads and writes. Missing checks for singular pivots, zero denominators, and zero spectral radius allowed divisions by zero. Unchecked matrix and vector pointers allowed null pointer dereferences. A loop condition logic error in Cuthill-McKee reordering skipped node 0 during graph level set traversal. |
|
||||
| `SEC-0226` | `src/libbrep/BBNode.cpp, src/libbrep/BRNode.cpp, src/libbrep/PullbackCurve.cpp, src/libbrep/Subcurve.cpp, src/libbrep/Subsurface.cpp, src/libbrep/assembly.cpp, src/libbrep/boolean.cpp, src/libbrep/brep_defines.h` | `BBNode.cpp:137, 209-214, 230-265, 305-325, 345-350, 400-410, 498-504, 508-525, 560-610; BRNode.cpp:60-65, 105-110, 260-295, 360-400, 412-420, 514-520; PullbackCurve.cpp:3190-3195, 3380-3386, 3390-3475, 3505-3590, 3820-3825, 4578-4581, 5359-5363; Subcurve.cpp:49, 69-93; Subsurface.cpp:50, 72-118; assembly.cpp:58-75, 353-402, 456-458; boolean.cpp:98, 142-225, 3356-3395; brep_defines.h:64` | Null Pointer Dereference, Division by Zero, Out-of-bounds Array Access | 2 | `CONFIRMED` | `FIXED` | In libbrep core evaluation, trimming, assembly, and pullback routines, missing null checks on curve, surface, face, and child pointers could result in null pointer dereferences. Missing checks against zero denominators in cubic curve interpolation, knot intervals, Newton solver steps, and basis control ratio calculations could cause division by zero. Edge index parameters in edge merging routines lacked array bounds checks before indexing brep edge tables. |
|
||||
| `SEC-0227` | `src/libbrep/debug_plot.cpp, src/libbrep/edit.cpp, src/libbrep/px_event.cpp, src/libbrep/quality.cpp, src/libbrep/ssx_event.cpp` | `debug_plot.cpp:137; edit.cpp:556-563, 680, 699-718, 832, 858-876; px_event.cpp:35-50; quality.cpp:70, 222-241; ssx_event.cpp:82-112` | Null Pointer Dereference, Division by Zero, Out-of-bounds Array Access, Incorrect Comparison Logic | 2 | `CONFIRMED` | `FIXED` | ON_PX_EVENT::Compare() had inverted null-pointer return values and returned bool instead of proper 3-way int; DumpSSXEvent() dereferenced curve pointers without null checks; bbox_contains() operated on potentially invalid points; edge quality loop accessed vertex and trim arrays without bounds checks; brep_edge_create() lacked index bounds validation; calculateTangentVectors(), getPosRoot(), bsplineBasisFuns(), and solveTridiagonalint() had unguarded divisions; write_plot_to_file() used fopen() result without NULL check. |
|
||||
| `SEC-0228` | `src/libbrep/cdt/cdt.cpp, src/libbrep/cdt/cdt_util.cpp, src/libbrep/cdt/mesh.cpp, src/libbrep/cdt/ovlps_simple.cpp, src/libbrep/cdt/surf.cpp, src/libbrep/cdt/tri_isect.cpp` | `cdt.cpp:755-763; cdt_util.cpp:39, 159, 180, 205, 230, 246, 262; mesh.cpp:176, 198, 225-245, 1301, 1391, 2648, 4139, 4252, 4276, 4304, 4322, 4344, 4362, 4380, 4412, 4474, 4521, 4536, 4550, 4565, 4617, 5124, 5896, 5908, 6167; ovlps_simple.cpp:315, 388-396; surf.cpp:140; tri_isect.cpp:120` | Null Pointer Dereference, Out-of-bounds Vector Access, Resource Leaks | 2 | `CONFIRMED` | `FIXED` | In libbrep CDT routines, missing size validation and null pointer checks on bedge_seg_t::uedges() in cdt.cpp and ovlps_simple.cpp caused potential out-of-bounds vector access and null pointer dereferences when accessing face meshes. In mesh.cpp, bedge_seg_t::uedges() dereferenced CDT state pointers, trim indices, face pointers, and polygon pointers without validation. Across mesh.cpp, cdt_util.cpp, tri_isect.cpp, and surf.cpp, pervasive unchecked fopen() return values in debug and plotting routines caused potential NULL pointer dereferences when writing to plot files. |
|
||||
| `SEC-0229` | `src/libbrep/shape_recognition/cone.cpp, src/libbrep/shape_recognition/cylinder.cpp, src/libbrep/shape_recognition/pipeline.cpp, src/libbrep/shape_recognition/planar.cpp, src/libbrep/shape_recognition/shape_recognition.cpp, src/libbrep/shape_recognition/sphere.cpp, src/libbrep/shape_recognition/sr_util.cpp, src/libbrep/shape_recognition/torus.cpp` | `cone.cpp:42-100, 116-242; cylinder.cpp:45-165, 184-358; pipeline.cpp:40-173, 280-410; planar.cpp:201-230, 294-352, 503-510, 531-547, 748-855, 960-1010; shape_recognition.cpp:163-171, 347-353, 410-454, 525-591; sphere.cpp:40-95, 115-180, 187-200; sr_util.cpp:42-75, 189-195, 248-256, 508-515, 626-635; torus.cpp:36-192` | Memory Access Violation, Out-of-bounds Array Access, Memory Leaks, Division by Zero, Null Pointer Dereference | 2 | `CONFIRMED` | `FIXED` | In planar.cpp, an off-by-one loop condition j <= array_end - array_start caused out-of-bounds read and write in triangulate_array_with_holes; outer_pt_ind, holes arrays, vert_map, and loop_starts leaked on every triangulation; BU_PTBL_GET dereferenced empty island_children causing null dereference crash; in cylinder.cpp, points[3] was accessed without checking points count > 3, and implicit_plane_ind was indexed without bounds checks; in cone.cpp, loop over cone planes indexed plane 1 when count was 1, and sin(C) was divided without zero checking; in pipeline.cpp, nde array leaked across multiple return paths, and nonplanar_surfaces was dereferenced when empty; in shape_recognition.cpp, unchecked fol_to_i iterator dereference caused crash, subbrep_shoal_data leaked when shoal_csg failed, and face_surface_types and uninserted sb leaked on failure; in sr_util.cpp, BU_PUT for obj->nucleus erroneously freed subbrep_shoal_data with struct csg_obj_params size/tag, and empty face->m_li caused out-of-bounds loop access; in sphere.cpp, a typo c2->IsArc(NULL, &a1) left a2 uninitialized and leaked curve duplicates c1 and c2; in torus.cpp, arc loop leaked curve ecv and ep_normal was incorrectly set to torus.plane.Normal(). |
|
||||
| `SEC-0230` | `src/libbrep/tools/tools.cpp, src/libbrep/tools/tools_util.cpp, src/libbrep/tests/brep_cdt_hole_face17.c, src/libbrep/tests/brep_cdt_hole_face27.c, src/libbrep/tests/brep_cdt_invalid.cpp, src/libbrep/tests/brep_cdt_mesh.cpp, src/libbrep/tests/assembly.cpp, src/libbrep/tests/ppx.cpp, src/libbrep/tests/pullback_context.cpp, src/libbrep/tests/test_curve_intersect.cpp, src/libbrep/tests/test_point_intersect.cpp` | `tools.cpp:43-70, 83-143, 197-286; tools_util.cpp:40-49, 83-148, 158-180, 182-228, 230-271; brep_cdt_mesh.cpp:27-48; brep_cdt_hole_face17.c:22-35, 3360-3415; brep_cdt_hole_face27.c:22-35, 6300-6355; assembly.cpp:103-109; ppx.cpp:218-225; pullback_context.cpp:504-512; test_curve_intersect.cpp:35-85; test_point_intersect.cpp:45-145` | Memory Leaks, Uncontrolled Recursion, Out-of-bounds Array Access, Null Pointer Dereference, Logic Error | 2 | `CONFIRMED` | `FIXED` | In libbrep tools and tests: in tools.cpp, find_next_point placed recursion limit inside else block, causing infinite recursion and stack exhaustion; ON_Curve_Get_Tangent and ON_Curve_Has_Tangent lacked null pointer and direction bounds checks; in ON_Surface_IsStraight, frames[0] and frames[1] were repeatedly indexed instead of frames[i] and frames[j]; in tools_util.cpp, ON_BrepTikz leaked duplicate edge curves on non-linear edges, and lacked null pointer and array bounds checks; in brep_cdt_mesh.cpp, invalid argument count printed usage but proceeded without exiting, dereferencing invalid argv[1]; in brep_cdt_hole_face17.c and brep_cdt_hole_face27.c, multiple heap-allocated arrays leaked on test completion; across test executables, argv[0] was passed to bu_setprogname without validating argc > 0 and argv != NULL. |
|
||||
| `SEC-0231` | `src/libfft/fftfast.c, src/libfft/splitdit.c, src/libfft/ditsplit.c, src/libfft/fftc.c, src/libfft/ifftc.c, src/libfft/splitditc.c, src/libfft/ditsplitc.c, src/libfft/fftest.c` | `fftfast.c:54-85, 120-165, 203-245, 290-345; splitdit.c:33-40; ditsplit.c:39-46; fftc.c:45-75; ifftc.c:44-75; splitditc.c:44-60; ditsplitc.c:46-62; fftest.c:39-60` | Infinite Loop Denial of Service, Null Pointer Dereference, Division by Zero, Missing Bounds Validation | 2 | `CONFIRMED` | `FIXED` | In libfft routines: in fftfast.c, init_sintab hung in an infinite loop if size was zero or negative, calloc return values were unchecked leading to null pointer dereferences, cdiv divided by sum-of-squares without checking for zero, and cfft, icfft, scramble, butterflies, and complex arithmetic functions lacked null pointer checks on data/result pointers. In splitdit.c and ditsplit.c, rfft and irfft lacked null checks and minimum length validation on input arrays. In fftc.c and ifftc.c, parse_fft_length permitted invalid size 1 and lacked upper bound checks, and main dereferenced argv without pointer validation. In splitditc.c and ditsplitc.c, generator functions lacked minimum dimension guards and embedded full source file paths. |
|
||||
| `SEC-0232` | `src/libtermio/libtermio.h, src/libtermio/linenoise.hpp` | `libtermio.h:176-215, 235-360, 780-795, 1100-1155; linenoise.hpp:2015-2060, 2075-2125, 2215-2240, 2325-2385, 2690-2740` | Buffer Overflow, Out-of-Bounds Array Access, Division by Zero & Missing Pointer Validation | 2 | `CONFIRMED` | `FIXED` | In libtermio: in libtermio.h, terminal parameter storage arrays save_tio and curr_tio were sized FOPEN_MAX (which can be as low as 20 on POSIX platforms) and lacked file descriptor bounds checking across clr_Echo, reset_Tty, save_Tty, set_Cbreak, and set_Raw, allowing out-of-bounds array writes on large or invalid file descriptors; termio_getch lacked FD_SET bounds checking on fd (fd >= FD_SETSIZE causes stack buffer overflow in select/FD_SET); in linenoise.hpp, EditHistoryNext used unbounded strcpy() from history strings into buf_ risking buffer overflow, EditInsert failed to check if len_ + clen exceeded buf_len_ leading to buffer overflow on multi-byte UTF-8 insertions, completeLine used unchecked string indexing &lc[i][0] on potentially empty strings and failed to clamp snprintf return value causing len_ to exceed buf_len_, refreshSingleLine and refreshMultiLine divided and modulo'd by cols_ without checking for <= 0 leading to division-by-zero crashes, and LoadHistory/SaveHistory/AddHistory/SetPrompt lacked null pointer validation. |
|
||||
| `SEC-0233` | `src/libpc/gecode_librt_test.cpp, src/libpc/solver_test.cpp, src/libpc/vm_test.cpp, src/libpc/domain_constraint_propagator.cpp, src/libpc/cartesian-heart.cpp, src/libpc/gecode_solver_test.cpp` | `gecode_librt_test.cpp:45-95; solver_test.cpp:43-85, 90-115; vm_test.cpp:38-45, 70-78, 140-145; domain_constraint_propagator.cpp:60-110; cartesian-heart.cpp:112-120; gecode_solver_test.cpp:70-75` | Out-of-Bounds Array Access, Division by Zero, and Missing Pointer Validation | 2 | `CONFIRMED` | `FIXED` | In libpc routines: in gecode_librt_test.cpp, add_constraint_coincident_pnt, add_constraint_perpendicular_vect, and add_constraint_pnt_on_line_segment indexed Space variable arrays with unchecked point indices risking out-of-bounds array access; in solver_test.cpp, constraint functors f1-f4 dereferenced getVariablebyID() return pointers without null checks, and getParameter('G') was dereferenced without null checking; in vm_test.cpp, div() divided by parameter b without zero protection, and findfunction dereferenced ct** ap without null validation; in domain_constraint_propagator.cpp, DisEq::post, copy, propagate, and diseq accepted Space* home without null checks; across test drivers, argv[0] was passed to bu_setprogname without validating argc > 0 and argv != NULL. |
|
||||
| `SEC-0234` | `src/nirt/main.cpp, src/nirt/showshot.c` | `main.cpp:145-158, 260-312, 460-505, 595-635, 740-815, 875-905; showshot.c:65-85, 90-100, 115-140` | Use-After-Free, Double-Free, Buffer Overflow, and Resource Leaks | 2 | `CONFIRMED` | `FIXED` | In nirt routines: in main.cpp, db_close(dbip) was invoked before reading database metadata dbi_local2base and dbi_title leading to use-after-free; ns was freed with BU_PUT but left non-NULL on failure paths triggering double-free in the cleanup block; in nirt_dest_cmd, popen/fopen/pclose logic set both io_data->out and io_data->err to the same pointer leading to double-pclose/double-fclose and leaked unclosed file handles on re-routing; in list_formats, fopen return was unchecked causing potential NULL pointer dereference; in the matrix reading loop, rt_read_cmd returned heap buffers that were leaked on each iteration; when no database file argument was provided, argv[0] was indexed out-of-bounds. In showshot.c, region name rname was populated in an unbounded character loop risking stack buffer overflow; radius input was unvalidated against zero or negative values; argv[0] was passed to bu_setprogname without validating argc > 0. |
|
||||
| `SEC-0235` | `src/bwish/cmd.c, src/bwish/input.c, src/bwish/main.c` | `cmd.c:80-155, 210-245, 250-285, 290-350; input.c:135-150, 220-240, 255-285, 320-335, 365-425, 490-530; main.c:75-85, 230-265, 280-288, 315-335` | Heap/Stack Buffer Overflow, Pointer Underflow, and Memory Leaks | 2 | `CONFIRMED` | `FIXED` | In bwish/btclsh routines: in cmd.c, historyInit allocated cmdhist with sizeof(struct bu_cmdhist_obj) instead of sizeof(struct bu_cmdhist) in realloc, and history_record_priv lacked capacity check before writing to cmdhist[currHist.size] risking heap buffer overflow; history_prev, history_cur, and history_next lacked bounds and empty-list checks; cmd_history leaked fp and continued processing on invalid option; in input.c, inputHandler loop condition evaluated buf[++i] when i == count - 1 leading to out-of-bounds read of buf[BU_PAGE_SIZE]; processChar underflowed size_t to SIZE_MAX when checking trailing newline on an empty string; backward-word and CTRL_W formed out-of-bounds pointers before the start of the string when index was zero; temporary bu_vls buffers were leaked across multiple editing operations; in main.c, tty_usable passed unvalidated file descriptors into FD_SET causing potential stack buffer overflow on fd >= FD_SETSIZE; main dereferenced unchecked argv[0] and lacked null verification on Tcl_CreateInterp. |
|
||||
| `SEC-0236` | `bench/clean.c, bench/compute.c, bench/run.c, bench/pixcmp.c, bench/benchmark.c` | `clean.c:70-90; compute.c:50-85; run.c:64-90; pixcmp.c:201-375; benchmark.c:80-105, 285-345, 385-455, 475-625, 820-965` | Format String Bugs, Division Errors, File Descriptor Leaks, and Bounds Checks | 2 | `CONFIRMED` | `FIXED` | In bench suite tools: in clean.c, clean_obstacles reused un-truncated vls instances appending .log to .pix strings creating corrupted paths and leaked heap buffers; in compute.c, average() decremented element count in loop condition causing division by negative one instead of total element count; in run.c, format string %s received a struct bu_vls by value corrupting the varargs stack; in pixcmp.c, argv[1] was dereferenced out-of-bounds when argc == 1, effective file size subtraction underflowed unsigned size_t when skip exceeded file size, and file pointers were leaked on exit paths; in benchmark.c, unchecked getenv("LOGFILE") and fopen returns risked null dereferences, inverted bu_strncasecmp logic caused any non-instruction flag to abort into instructions mode, option=value parsing used the key instead of the value, open(logfile) leaked file descriptors, %.2lfs format string received a const char* instead of double, and bu_vls structs were leaked across all exit paths. |
|
||||
| `SEC-0237` | `src/art/tile.cpp, src/art/brlcadplugin.h, src/art/brlcadplugin.cpp, src/art/art.cpp` | `tile.cpp:63-88; brlcadplugin.h:60-65; brlcadplugin.cpp:120-175, 215-260, 325-455, 525-540; art.cpp:270-285, 400-405, 479-514, 550-600, 740-750, 880-910, 1065-1075, 1135-1145, 1280-1310, 1375-1380, 1415-1445, 1475-1545, 1605-1615` | Buffer Bounds, Resource Leaks, Null Dereferences, and Out-of-Bounds Memory Access | 2 | `CONFIRMED` | `FIXED` | In art Appleseed ray tracing integration: in tile.cpp, on_tile_end lacked null checks on frame and framebuffer handle fbp, lacked tile index bounds checks, inverted row offset calculation risked out-of-bounds row indexing on edge pixels, and pixel buffer reads lacked size bounds validation; in brlcadplugin.h, Model lacked static linkage risking duplicate symbols; in brlcadplugin.cpp, brlcad_hit lacked null validation on ap and PartHeadp and dereferenced unchecked pt_inseg and pt_outseg pointers, BrlcadObject constructor dereferenced unchecked p_ap and rti_dbip pointers, BrlcadObject::release leaked rtip by never calling rt_i_destroy, intersect routines lacked null checks on resources and name, get_id allowed unbounded thread counter indexing past MAX_PSW in resources array leading to out-of-bounds heap access, and configure_raytrace_application leaked heap-allocated objv and accessed objects[0] without bounds validation; in art.cpp, color_hook called BU_CK_STRUCTPARSE before checking null pointer sp, art_validate_options performed raw float equality on airdensity, art_parse_light_intensity lacked pointer checks on bright and fract, register_region opened a ged instance per visited region and leaked it on all non-light paths while failing to check for GED_NULL, build_project opened a secondary dbip and leaked it every frame without calling db_close, temporary bu_vls instances fov, dimensions, and str were leaked on exit paths, art_save_image lacked null checks on filename and frame pointer, and main lacked argv[0] guards and leaked resources on failure exits. |
|
||||
| `SEC-0238` | `src/launcher/launcher.c, src/launcher/registry.c, src/launcher/launch.c, src/launcher/fbtext.c, src/launcher/ui_fb.c, src/launcher/ui_text.c` | `launcher.c:48-62, 73-95; registry.c:59-87, 92-104, 110-165, 190-210, 235-260; launch.c:46-72, 120-135; fbtext.c:83-119, 174-198; ui_fb.c:64-88, 108-170, 174-237, 260-272, 380-422; ui_text.c:56-72` | Buffer Overflow, Out-of-bounds Array Access, Null Pointer Dereference, and Input Validation | 2 | `CONFIRMED` | `FIXED` | In BRL-CAD launcher tools and UI: in launcher.c, bu_setprogname(argv[0]) was called without validating argc > 0 and argv != NULL, list_apps dereferenced r without checking for NULL, and fprintf hardcoded binary name instead of using bu_getprogname(); in registry.c, registry_grow and trim lacked null pointer validation on inputs, registry_resolve dereferenced unchecked pointer e, registry_parse and registry_add_builtins failed to check registry_grow return values risking null dereference if growth failed, and app_registry_load failed to check bu_dir return values before probing paths and directory existence; in launch.c, prepend_bindir_to_path unchecked bu_dir return before using bindir, and launch_shell used un-buffered static bu_which pointer across multiple function invocations; in fbtext.c, draw_char lacked framebuffer vertical row bounds checks risking out-of-bounds row indexing on edge pixels and lacked pointer validation on fbp, vfp, and vdp, and fbtext_draw calculated width limit without margin margin check; in ui_fb.c, fill_rect, draw_border, blit_icv, load_splash, redraw, and activate lacked null pointer checks on framebuffer, image, and registry structures, load_splash lacked zero/negative dimension guards, redraw and activate indexed r->apps without bounds-checking button action indices, and mouse click and Enter key handlers indexed button array without bounds validation; in ui_text.c, print_menu lacked null pointer checks on r. |
|
||||
| `SEC-0239` | `src/isst/gfile.h, src/isst/gfile.cpp, src/isst/isstgl.h, src/isst/isstgl.cpp, src/isst/main.cpp, src/isst/main_window.cpp, src/isst/isstapp.cpp` | `gfile.h:44-55; gfile.cpp:45-55, 60-120, 130-200, 210-235, 240-340; isstgl.h:58-69, 79-95; isstgl.cpp:37-67, 68-106, 108-126, 128-250, 280-295, 300-330, 340-390; main.cpp:35-40, 50-75; main_window.cpp:61-78, 99-103; isstapp.cpp:28-42` | Buffer Overflow, Memory Leaks, Division by Zero, Null Pointer Dereference, and Out-of-Bounds Memory Access | 2 | `CONFIRMED` | `FIXED` | In BRL-CAD ISST interactive ray-tracing subsystem: in gfile.h and gfile.cpp, GFile lacked constructor and destructor leaving pointer members uninitialized; closedb() only freed the tie wrapper and leaked tie tree internals, meshes list, and mesh attributes; load_g() leaked dbip if db_dirbuild() failed, left dangling pointers in tribuf and dbip, and leaked allocated strings from db_path_to_string() on every region; in nmg_to_adrt_internal(), vert_count increment and buffer writing occurred before bounds validation risking out-of-bounds array writes on non-triangle loops and called bu_exit() instead of gracefully skipping; in nmg_to_adrt_regstart(), BoT face vertex indices lacked bounds checking against num_vertices risking heap out-of-bounds reads and leaked intern memory from rt_db_get_internal(); file-static gcvwriter global state caused concurrency and re-entrancy issues; in isstgl.h and isstgl.cpp, TIERenderer constructor left camera struct uninitialized causing multiplication of garbage integers in texdata buffer allocation, resize() performed unchecked integer division by width risking division by zero, res_decr() miscalculated horizontal resolution using height instead of width, render() dereferenced NULL tie if no scene was loaded, set_tie() updated renderer state without acquiring render mutex, and camera.view_list was leaked in destructor; in main.cpp, argc check if (argc > 1) prevented loading single file arguments and lacked argv[0] null guard; in main_window.cpp, raw C casts and unchecked canvas pointers were used; in isstapp.cpp, statusBar and canvas pointers were dereferenced without null checks. |
|
||||
| `SEC-0240` | `src/libbv/adc.c, src/libbv/diff.c, src/libbv/font.c, src/libbv/hash.c, src/libbv/knobs.cpp, src/libbv/lod.cpp, src/libbv/polygon.c, src/libbv/polygon_fill.cpp, src/libbv/polygon_op.cpp, src/libbv/snap.c, src/libbv/tests/list.c, src/libbv/tests/plot3.c, src/libbv/tests/test_camera.c, src/libbv/tests/test_lod_cache.cpp, src/libbv/tests/vlist.c, src/libbv/util.cpp, src/libbv/view_sets.cpp, src/libbv/vlist.c` | `adc.c:48-95; diff.c:60-120, 180-240; font.c:50-80; hash.c:70-130, 200-280; knobs.cpp:60-110, 190-260, 480-530; lod.cpp:90-140, 240-300, 390-440, 500-550, 1200-1260; polygon.c:80-140, 200-350, 400-520, 600-750; polygon_fill.cpp:40-90, 120-180; polygon_op.cpp:60-90; snap.c:70-130, 180-250, 300-380; tests/list.c:60-100, 150-170, 350-370, 490-535; tests/plot3.c:50-80; tests/test_camera.c:280-290; tests/test_lod_cache.cpp:280-290; tests/vlist.c:40-65; util.cpp:45-55, 335-445, 480-515, 560-675, 940-1055, 1125-1150, 1200-1540, 1630-1910; view_sets.cpp:40-120; vlist.c:40-60, 115-135, 175-215, 220-235, 240-255, 260-275, 325-340, 360-395, 400-475, 565-675` | Memory Leaks, Buffer Overflow, Division by Zero, Out-of-bounds Array Access, and Null Pointer Dereferences | 1 | `CONFIRMED` | `FIXED` | In BRL-CAD libbv view library: in vlist.c, bv_vlblock_to_objs leaked cname and oobjs data structures, and bv_vlblock_init suffered integer overflow and out-of-bounds writes when max_ent < 2; in util.cpp, bv_free leaked display list freelist nodes and freed scene object internal state, division by zero was possible in _bv_trans, _bv_scale, and isize calculations, and bv_obj_get_vo mismatched free list tracking and dereferenced null pointer structures; in lod.cpp, POPState divisions lacked zero-extent checks, and bv_mesh_lod_free leaked context and state; in knobs.cpp, divisions by gv_scale and gv_size lacked ZERO checks; in polygon.c, polygon_fill.cpp, and snap.c, missing array bounds checks risked out-of-bounds memory accesses and divisions lacked zero checks; in test binaries, plot3.c leaked file pointers and inverted text mode, tests/vlist.c indexed argv before checking argc and leaked vlist nodes, and tests/list.c had an off-by-one loop in convert_points. |
|
||||
| `SEC-0241` | `src/libdm/X/color.c, src/libdm/X/dm-X.c, src/libdm/X/if_X24.c, src/libdm/axes.c, src/libdm/clip.c, src/libdm/dm-generic.c, src/libdm/dm-gl.c, src/libdm/dm_plugins.cpp, src/libdm/dm_util.c, src/libdm/fb_generic.c, src/libdm/fb_paged_io.c, src/libdm/fb_util.c, src/libdm/fbserv.c, src/libdm/glx/if_ogl.c, src/libdm/if_mem.c, src/libdm/if_remote.c, src/libdm/if_stack.c, src/libdm/labels.c, src/libdm/postscript/dm-ps.c, src/libdm/qtgl/dm-qtgl.cpp, src/libdm/qtgl/fb-qtgl.cpp, src/libdm/scale.c, src/libdm/swrast/dm-swrast.cpp, src/libdm/swrast/fb-swrast.cpp, src/libdm/tkswrast/dm-tkswrast.cpp, src/libdm/view.c, src/libdm/wgl/dm-wgl.c, src/libdm/wgl/if_wgl.c` | `X/color.c:70-130, 200-240; X/dm-X.c:200-250, 480-530, 600-660; X/if_X24.c:480-530, 1100-1160; axes.c:80-140, 200-260; clip.c:70-130, 180-230; dm-generic.c:50-90; dm-gl.c:180-240, 380-440; dm_plugins.cpp:60-140; dm_util.c:40-80; fb_generic.c:80-150; fb_paged_io.c:60-150; fb_util.c:60-140; fbserv.c:160-220, 380-430; glx/if_ogl.c:480-540, 950-1050; if_mem.c:70-140, 200-260; if_remote.c:120-180, 240-300; if_stack.c:60-120; labels.c:80-140, 200-260; postscript/dm-ps.c:120-180, 320-380; qtgl/dm-qtgl.cpp:160-220, 400-470; qtgl/fb-qtgl.cpp:200-260, 400-470, 750-820; scale.c:60-80; swrast/dm-swrast.cpp:180-250, 420-490; swrast/fb-swrast.cpp:210-270, 420-490, 750-820; tkswrast/dm-tkswrast.cpp:70-130; view.c:120-190, 320-400, 500-600; wgl/dm-wgl.c:180-250, 410-480; wgl/if_wgl.c:200-270, 440-510, 800-870` | Memory Leaks, Buffer Overflow, Division by Zero, Out-of-bounds Memory Access, and Null Pointer Dereferences | 1 | `CONFIRMED` | `FIXED` | In BRL-CAD libdm display manager and framebuffer library: in X/color.c, _X_copy_cmap had out-of-bounds write risk, float cast truncation in X_get_pixel, and division by zero in X_allocate_color_cube; in X/if_X24.c and X/dm-X.c, off-by-one loop bound in X24_cmap, integer overflow in X24_getmem, missing XDestroyImage resource leaks, and division by zero in X_reshape; in glx/if_ogl.c, wgl/if_wgl.c, and dm-gl.c, integer overflow in getmem, leaks on context creation failures, division by zero in reshape and clipper, and bounds check vulnerabilities in image routines; in postscript/dm-ps.c, NULL pointer checks and memory leaks in ps_close and draw routines; in qtgl and swrast backends, unprotected VIEWFACTOR macro, out-of-bounds scanline writes in xmit_scanlines, division by zero in fb_clipper, and leaks of dm_log and memory contexts; in tkswrast, NULL pointer dereferences in event and buffer handlers; in clip.c, division by zero when dx/dy is zero and unsafe static locals; in axes.c, view.c, scale.c, and labels.c, unchecked pointer dereferences, division by zero in aspect/FPS calculations, unbounded tick iteration, and buffer overflow in POINT_LABEL_STR; in fb_generic.c and fb_paged_io.c, unchecked division by zero in page calculations and zoom; in if_mem.c, if_remote.c, and if_stack.c, integer multiplication overflow in allocation, unclosed sockets/resources on error paths, and unbounded stack buffer copy in stk_open. |
|
||||
| `SEC-0242` | `src/libgcv/bottess.c, src/libgcv/facetize.c, src/libgcv/plugins/decimate/decimate.c, src/libgcv/plugins/fastgen4/fastgen4_read.c, src/libgcv/plugins/fastgen4/fastgen4_write.cpp, src/libgcv/plugins/iges/tests/test_gcv_iges.cpp, src/libgcv/plugins/iges/tests/test_iges_brep.cpp, src/libgcv/plugins/iges/tests/test_iges_document.cpp, src/libgcv/plugins/iges/tests/test_iges_import.cpp, src/libgcv/plugins/iges/tests/test_iges_orientation.cpp, src/libgcv/plugins/iges/tests/test_iges_rays.cpp, src/libgcv/plugins/iges/tests/test_iges_writer.cpp, src/libgcv/plugins/jt/jt_read.cpp, src/libgcv/plugins/jt/test_jt_parser.cpp, src/libgcv/plugins/jt/test_jt_topology.cpp, src/libgcv/plugins/obj/obj_read.c, src/libgcv/plugins/obj/obj_write.c, src/libgcv/plugins/obj/tri_face.c, src/libgcv/plugins/ply/ply_read.c, src/libgcv/plugins/ply/ply_write.c, src/libgcv/plugins/rhino/rhino_read.cpp, src/libgcv/plugins/scad/scad_read.c, src/libgcv/plugins/stl/stl_read.c, src/libgcv/plugins/stl/stl_write.cpp, src/libgcv/plugins/vrml/vrml_read/file_util.cpp, src/libgcv/plugins/vrml/vrml_read/string_util.cpp, src/libgcv/plugins/vrml/vrml_read/test_vrml1_parser.cpp, src/libgcv/plugins/vrml/vrml_read/vrml_read.cpp, src/libgcv/plugins/vrml/vrml_write.c, src/libgcv/region_end.c, src/libgcv/region_end_mc.c, src/libgcv/tests/test_bottess.c, src/libgcv/tests/test_context.c, src/libgcv/tri_intersect.c` | `bottess.c:80-140, 200-260, 480-530; facetize.c:60-120; plugins/decimate/decimate.c:70-130; plugins/fastgen4/fastgen4_read.c:80-140; plugins/fastgen4/fastgen4_write.cpp:100-160; plugins/iges/tests/test_*.cpp:40-100; plugins/jt/jt_read.cpp:80-150; plugins/obj/obj_read.c:120-180; plugins/obj/obj_write.c:90-150; plugins/obj/tri_face.c:60-120; plugins/ply/ply_read.c:80-140; plugins/ply/ply_write.c:100-160; plugins/rhino/rhino_read.cpp:120-180; plugins/scad/scad_read.c:60-120; plugins/stl/stl_read.c:70-130; plugins/stl/stl_write.cpp:80-140; plugins/vrml/vrml_read/*:60-140; plugins/vrml/vrml_write.c:90-160; region_end.c:70-140; region_end_mc.c:80-150; tests/test_bottess.c:40-80; tests/test_context.c:40-80; tri_intersect.c:50-110` | Memory Leaks, Buffer Overflow, Division by Zero, Out-of-bounds Memory Access, and Null Pointer Dereferences | 2 | `CONFIRMED` | `FIXED` | In BRL-CAD libgcv geometry conversion library and plugins: in bottess.c, fixed -Wbad-function-cast float-to-integer conversion by using safe integer arithmetic for face count partitioning, added bounds checks on polygon vertices, and plugged memory leaks; in plugins/obj/obj_read.c and ply_write.c, initialized structure members preventing undefined memory reads and uninitialized pointer dereferences; in plugins/fastgen4, obj, ply, stl, jt, rhino, and vrml readers/writers, guarded against division by zero in normal and scaling calculations, added boundary validation on vertex and triangle indices, and prevented resource leaks on error exit paths; in region_end.c and region_end_mc.c, added cleanup for intermediate geometry allocations; in standalone tests, guarded input arguments and initialized bu_setprogname(argv[0]). |
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
| `SEC-0243` | `src/libged/3ptarb/3ptarb.c, src/libged/adc/adc.c, src/libged/adjust/adjust.c, src/libged/alphanum.h, src/libged/analyze/arb8.cpp, src/libged/analyze/arbn.cpp, src/libged/analyze/ars.cpp, src/libged/analyze/op_pnts_vol.cpp, src/libged/analyze/sketch.cpp, src/libged/analyze/superell.cpp, src/libged/analyze/util.cpp, src/libged/arb/arb.cpp, src/libged/arb/repair.cpp, src/libged/arb/rotate_arb_face.c, src/libged/arced/arced.c, src/libged/arot/arot.c, src/libged/arrange/nest_raster.cpp, src/libged/bb/bb.c, src/libged/bev/bev.c, src/libged/bo/bo.c, src/libged/ged_util.cpp` | `3ptarb.c:70-130; adc.c:160-230, 480-530; adjust.c:80-140; alphanum.h:50-100; analyze/arb8.cpp:100-140; analyze/arbn.cpp:80-130; analyze/ars.cpp:40-100; analyze/op_pnts_vol.cpp:120-180; analyze/sketch.cpp:60-120; analyze/superell.cpp:70-130; analyze/util.cpp:100-180; arb/arb.cpp:80-140; arb/repair.cpp:60-120; arb/rotate_arb_face.c:70-130; arced/arced.c:90-140; arot/arot.c:60-120; arrange/nest_raster.cpp:80-130; bb/bb.c:90-160; bev/bev.c:100-180; bo/bo.c:70-140; ged_util.cpp:210-270` | Memory Leaks, Buffer Overflow, Division by Zero, Out-of-bounds Memory Access, and Null Pointer Dereferences | 2 | `CONFIRMED` | `FIXED` | In BRL-CAD libged command implementations (3ptarb, adc, adjust, alphanum, analyze, arb, arced, arot, arrange, bb, bev, bo, and ged_util): in 3ptarb.c, fixed memory leak of internal.idb_ptr when db_diradd fails; in adc.c, prevented stack buffer overflow by clamping argc > 3 before populating user_pt[3], added ZERO(gv_scale) guards preventing division by zero, and corrected pos_model vs pos_view typo in MAT4X3PNT; in adjust.c, prevented memory leak and fixed double-free on wdb_put_internal; in alphanum.h, added NULL pointer checks and replaced unsigned long subtraction with direct comparison to prevent integer wrap-around; in analyze/arb8.cpp, arbn.cpp, ars.cpp, op_pnts_vol.cpp, sketch.cpp, superell.cpp, and util.cpp, added NULL pointer checks, checked wdb_dbopen return values, prevented division by zero, bounded ARS curve and point indices, bounded face table widths, and plugged resource leaks; in arb.cpp, repair.cpp, rotate_arb_face.c, and arced.c, eliminated double-free bugs following database insertion and validated ARB type ranges; in arot.c and ged_util.cpp, added input validation and ZERO(MAGNITUDE(axis)) division-by-zero guards; in arrange/nest_raster.cpp, guarded voxel_count against division by zero; in bb.c, eliminated unconditional double-free of new_intern and freed memory on db_diradd failure; in bev.c, validated boolean operator, cleaned up intermediate trees and NMG models on error paths, and fixed memory leaks; in bo.c, checked NULL pointer returns and added integer multiplication overflow checks before file output. |
|
||||
| `SEC-0244` | `src/libged/bot/bot.cpp, src/libged/bot/bot_condense.c, src/libged/bot/bot_decimate.c, src/libged/bot/bot_face_fuse.c, src/libged/bot/bot_face_sort.c, src/libged/bot/bot_flip.c, src/libged/bot/bot_flood_exterior.cpp, src/libged/bot/bot_fuse.c, src/libged/bot/bot_merge.c, src/libged/bot/bot_openvdb.cpp, src/libged/bot/bot_smooth.c, src/libged/bot/bot_split.c, src/libged/bot/bot_sync.c, src/libged/bot/bot_vertex_fuse.c, src/libged/bot/check.cpp, src/libged/bot/decimate.cpp, src/libged/bot/dump/bot_dump.cpp, src/libged/bot/dump/dxf.c, src/libged/bot/dump/obj.c, src/libged/bot/dump/sat.c, src/libged/bot/dump/stl.c, src/libged/bot/edbot.c, src/libged/bot/exterior.cpp, src/libged/bot/extrude.cpp, src/libged/bot/info.cpp, src/libged/bot/pick.cpp, src/libged/bot/remesh.cpp, src/libged/bot/smooth.cpp, src/libged/bot/subdivide.cpp, src/libged/brep/brep.cpp, src/libged/brep/conversion.cpp, src/libged/brep/csg.cpp, src/libged/brep/dplot.c, src/libged/brep/dplot_reader.c, src/libged/brep/info.cpp, src/libged/brep/intersect.cpp, src/libged/brep/pick.cpp, src/libged/brep/plot.cpp, src/libged/brep/repair.cpp, src/libged/brep/tikz.cpp, src/libged/brep/topology.cpp, src/libged/brep/valid.cpp` | `bot/bot.cpp:148-166; bot/bot_*.c:40-150; bot/check.cpp:50-90; bot/decimate.cpp:40-90; bot/dump/*:40-160; bot/edbot.c:70-130; bot/exterior.cpp:60-120; bot/extrude.cpp:70-130; bot/info.cpp:50-100; bot/pick.cpp:40-90; bot/remesh.cpp:50-100; bot/smooth.cpp:60-120; bot/subdivide.cpp:50-100; brep/brep.cpp:100-180; brep/conversion.cpp:80-180; brep/csg.cpp:60-220; brep/dplot.c:50-110; brep/dplot_reader.c:60-120; brep/info.cpp:70-150; brep/intersect.cpp:60-130; brep/pick.cpp:50-110; brep/plot.cpp:80-500; brep/repair.cpp:60-140; brep/tikz.cpp:35-240; brep/topology.cpp:55-275; brep/valid.cpp:60-535` | Memory Leaks, Buffer Overflow, Division by Zero, Out-of-bounds Array Access, and Null Pointer Dereferences | 2 | `CONFIRMED` | `FIXED` | In BRL-CAD libged bot and brep command implementations: across bot subcommands, ensured proper rt_db_internal initialization and cleanup, added array bounds checks on vertices, faces, and thicknesses, guarded against division by zero in normal and decimation calculations, prevented memory leaks of internal structures and allocated vertex/face buffers on error paths, and fixed double-free hazards on wdb_export/wdb_put_internal; in bot dumping routines (dxf, obj, sat, stl), added bounds checks, validated fopen returns, and plugged resource leaks; in brep subcommands (brep, conversion, csg, dplot, dplot_reader, info, intersect, pick, plot, repair, tikz, topology, valid), fixed memory leaks of internal structures and temporary trees, added NULL pointer checks on brep and surface pointers, guarded array and trim indices across all plotting and validity commands, fixed copy-paste typo in repair and rgb check in tikz, added division-by-zero protection on scale calculation, and validated return values of edge creation. |
|
||||
| `SEC-0245` | `src/libged/cc/cc.c, src/libged/check/check.c, src/libged/check/check_adj_air.c, src/libged/check/check_centroid.c, src/libged/check/check_exp_air.c, src/libged/check/check_gap.c, src/libged/check/check_mass.c, src/libged/check/check_moments.c, src/libged/check/check_overlaps.c, src/libged/check/check_surf_area.c, src/libged/check/check_unconf_air.c, src/libged/check/check_volume.c, src/libged/coil/coil.c, src/libged/color/color.c, src/libged/columns.c, src/libged/comb/comb.c, src/libged/comb_std/comb_std.c, src/libged/combmem/combmem.c, src/libged/concat/concat.cpp, src/libged/constraint/constraint.c, src/libged/copymat/copymat.c, src/libged/cpi/cpi.c, src/libged/dbi_state.cpp, src/libged/debug/debug2c/debug2c.cpp` | `cc.c:70-95; check/check.c:190-210, 440-520; check/check_adj_air.c:40-60, 95-105; check/check_centroid.c:35-50; check/check_exp_air.c:40-60, 95-105; check/check_gap.c:40-60, 95-105; check/check_mass.c:35-50; check/check_moments.c:160-175; check/check_overlaps.c:165-175, 230-260; check/check_surf_area.c:35-50; check/check_unconf_air.c:40-65, 95-110; check/check_volume.c:35-80; coil/coil.c:330-405, 440-555; color/color.c:165-245; columns.c:45-80; comb/comb.c:110-120, 480-550; comb_std/comb_std.c:330-350, 610-660; combmem/combmem.c:470-498; concat/concat.cpp:280-335, 400-475; constraint/constraint.c:30-175; copymat/copymat.c:90-155; cpi/cpi.c:85-100; dbi_state.cpp:240-305, 455-465; debug/debug2c/debug2c.cpp:150-160` | Memory Leaks, Double-Free, Division by Zero, Infinite Loop, Array Out-of-Bounds, and File Descriptor Leaks | 2 | `CONFIRMED` | `FIXED` | In libged Batch 3 commands: in cc.c and cpi.c, freed internal representation on db_diradd failure and removed redundant double-free on write; in check/*.c routines, added NULL checks, guarded against division by zero on uninitialized unit values, plugged plot file descriptor leaks on raytrace failure, and freed heap VLS instances; in coil.c, freed allocated sections on exit paths, validated sscanf on -S, prevented division by zero, and clamped negative lengths; in color.c, fixed cnt != 9 typo to cnt != 5 and ensured temp file deletion on error paths; in columns.c, added NULL checks on input strings; in comb.c, comb_std.c, combmem.c, and copymat.c, fixed double-frees following rt_db_put_internal, freed internal structures across decimation iterations and diradd errors, freed rt_tree_array in combmem, and fixed infinite loop on paren evaluation; in concat.cpp, guarded argv[1] bounds, closed incoming database on error exits, and freed internal memory on copy failures; in constraint.c, validated argc bounds across all subcommands; in dbi_state.cpp, deleted view_states map in destructor, and aborted/cleared transactions on cache retrieval failure; in debug2c.cpp, checked file open success before reading. |
|
||||
| `SEC-0246` | `src/libged/decompose/decompose.c, src/libged/delay/delay.c, src/libged/display_list.c, src/libged/dm/dm.c, src/libged/dm/ert.cpp, src/libged/dm/screengrab.c, src/libged/draw.cpp, src/libged/draw/bigE.c, src/libged/draw/draw.c, src/libged/draw/draw2.cpp, src/libged/draw/loadview.cpp, src/libged/draw/preview.cpp, src/libged/dsp/dsp.c, src/libged/dump/dump.c, src/libged/dup/dup.c, src/libged/eac/eac.c, src/libged/edcodes/edcodes.c` | `decompose.c:110-185; delay.c:50-75; display_list.c:130-170, 715-770; dm/dm.c:280-320, 680-775; dm/ert.cpp:115-180; dm/screengrab.c:60-140; draw.cpp:210-240, 310-335, 785-845; draw/bigE.c:70-200; draw/draw.c:840-865, 1260-1285; draw/draw2.cpp:260-310; draw/loadview.cpp:140-180, 220-370; draw/preview.cpp:190-205, 370-475; dsp/dsp.c:85-125; dump/dump.c:60-70; dup/dup.c:50-165, 220-235; eac/eac.c:75-90; edcodes/edcodes.c:45-65, 110-135, 220-285` | Memory Leaks, Buffer Overflow, Division by Zero, Out-of-bounds Memory Access, and Null Pointer Dereferences | 2 | `CONFIRMED` | `FIXED` | In BRL-CAD libged Batch 4 commands: in decompose.c, fixed memory leaks on non-NMG solids and db_lookup/db_diradd failures, replaced sprintf with snprintf, and eliminated double-free of new_m; in delay.c, validated sec/usec against negative values before select(); in display_list.c, added NULL checks across erase and hash helpers and handled failure in invent_solid; in dm/dm.c, guarded argc > 0 before argv indexing, freed dm_name leaks, and corrected return status; in dm/ert.cpp, guarded against division by zero in aspect ratio, fixed loop index typo, and freed bu_vls; in dm/screengrab.c, freed dm_name on help path, added ndmp NULL guard, fixed argv bounds, and freed idata on failure; in draw.cpp, guarded division by zero, plugged db_intern leaks in csg_wireframe_update and brep_adaptive_plot, and cleaned up on draw_scene error paths; in draw/bigE.c, resolved TODO by freeing dgcdp, plugged dgcdp->ap leak on each iteration, and prevented duplicate ptbl initializations; in draw/draw.c, freed brep_intern on get_path_and_state error and freed obj_path in ged_redraw_core; in draw/draw2.cpp, guarded dbi_state and corrected view state lookup loop; in draw/loadview.cpp, prevented size_t underflows, freed tcl_argv, fixed orientation quaternion bounds, and guarded against division by zero; in draw/preview.cpp, prevented buffer overflow in ged_cm_tree, checked argc >= 2 before fopen, and freed gd_rt_cmd and ged_tmp_uptrs; in dsp/dsp.c, validated xy argument count, fixed off-by-one bounds check, fixed intern2 typo in diff subcommand, and freed intern on lookup/read errors; in dump/dump.c, used wdb_close on rt_wdb; in dup/dup.c, enforced max_entries check to prevent array bounds overflow; in eac/eac.c, freed vls on read error, checked ID_COMBINATION, and used rt_db_free_internal; in edcodes/edcodes.c, added NULL pointer checks in comparisons, checked argc >= 2, freed av on fopen error, and used rt_db_free_internal. |
|
||||
| `SEC-0247` | `src/libged/edit/edarb.c, src/libged/edit/edit.cpp, src/libged/edit/facedef.c, src/libged/edit/rotate_eto.c, src/libged/edit/rotate_extrude.c, src/libged/edit/rotate_hyp.c, src/libged/edit/rotate_tgc.c, src/libged/edit/scale_ehy.c, src/libged/edit/scale_ell.c, src/libged/edit/scale_epa.c, src/libged/edit/scale_eto.c, src/libged/edit/scale_extrude.c, src/libged/edit/scale_hyp.c, src/libged/edit/scale_metaball.c, src/libged/edit/scale_part.c, src/libged/edit/scale_pipe.c, src/libged/edit/scale_rhc.c, src/libged/edit/scale_rpc.c, src/libged/edit/scale_superell.c, src/libged/edit/scale_tgc.c, src/libged/edit/scale_tor.c, src/libged/edit/translate_extrude.c, src/libged/edit/translate_tgc.c, src/libged/edit/uri.hh` | `edarb.c:125-135, 175-185, 215-275, 325-335; edit.cpp:1350-1365, 1515-1555; facedef.c:190-205, 385-395; rotate_eto.c:38-46; rotate_extrude.c:38-45; rotate_hyp.c:38-46; rotate_tgc.c:38-46; scale_ehy.c:38-52; scale_ell.c:38-92; scale_epa.c:38-52; scale_eto.c:38-115; scale_extrude.c:38-52; scale_hyp.c:38-75; scale_metaball.c:45-56; scale_part.c:38-50; scale_pipe.c:255-268; scale_rhc.c:38-56; scale_rpc.c:38-56; scale_superell.c:38-92; scale_tgc.c:38-170; scale_tor.c:38-46; translate_extrude.c:38-48; translate_tgc.c:38-48; uri.hh:54-64` | Memory Leaks, Double-Free, Dangling Pointer, Division by Zero, Out-of-bounds Memory Access, and Null Pointer Dereferences | 2 | `CONFIRMED` | `FIXED` | In BRL-CAD libged edit commands (src/libged/edit/*): in edarb.c and facedef.c, eliminated double-free hazards where rt_db_free_internal was called after GED_DB_PUT_INTERN (which unconditionally frees the internal structure), added ARB edge bounds validation (1 to 12) in edarb_edgedir, and validated argc >= 4 before accessing argv in edarb_facedef; in edit.cpp, scoped bn_tol to function scope in cmd_checkpoint::exec to prevent dangling pointer in s->tol, and in cmd_perturb::dp_perturb ensured intern is freed on all exit paths, prevented double-free of pintern contents on write failure, and freed the pintern container struct; in rotate_*.c, scale_*.c, and translate_*.c, guarded against NULL attribute pointers and empty strings before indexing; across scale_*.c (scale_ehy, scale_ell, scale_epa, scale_eto, scale_extrude, scale_hyp, scale_part, scale_rhc, scale_rpc, scale_superell, scale_tgc), guarded all vector MAGNITUDE calculations against division by zero in non-relative scaling modes; and in uri.hh, guarded against constructing std::string from NULL uri_text pointer. |
|
||||
| `SEC-0248` | `src/libged/editit/editit.c, src/libged/edmater/edmater.c, src/libged/env/env.c, src/libged/env/env2c/env2c.cpp, src/libged/erase/erase.c, src/libged/erase/erase2.cpp, src/libged/exec.cpp, src/libged/exists/exists.c, src/libged/expand/expand.c, src/libged/eye_pos/eye_pos.c` | `editit.c:58-95; edmater.c:72-100; env.c:50-56; env2c.cpp:184-198, 480-488, 575-585; erase.c:76-105, 130-145, 172-185; erase2.cpp:72-80, 104-115; exec.cpp:37-58, 80-100; exists.c:224-248, 300-312, 472-530, 665-672; expand.c:36-54, 75-95; eye_pos.c:38-54, 80-90` | Memory Leaks, Out-of-bounds Memory Access, Logic Errors, and Null Pointer Dereferences | 2 | `CONFIRMED` | `FIXED` | In BRL-CAD libged Batch 6 commands: in editit.c, corrected bu_opt_desc array indexing collision (d[0]..d[4]) where -e and -f overwrote -h and -? options, handled negative opt_ret return values, and freed bu_vls buffers on error and help paths; in edmater.c, passed argc + 1 instead of argc to ged_exec_wmater to prevent argument truncation and failure in wmater, guarded argc <= 1 before accessing argv[0], and matched bu_malloc allocation tag; in env.c, added gedp and gedp->ged_result_str NULL checks and validated argc > 0; in env2c.cpp, validated argc range (3..4), added negative argc check on bu_opt_parse in generated env_cmd code, and broadened exception catching to std::exception; in erase.c, freed new_argv on the attribute lookup path, freed bu_vls across all exits, prevented out-of-bounds indexing in bu_avs_add, and properly skipped flag arguments in erase -r and default paths without variable shadowing; in erase2.cpp, guarded negative opt_ret from bu_opt_parse, freed cvls on failure, and guarded against argc <= 0 and NULL bvs before calling erase_path; in exec.cpp, guarded against NULL argv[0] when argc decreases, checked gedp->i and gedp->i->i before dereferencing, and decremented cmd_recursion_depth_cnt and popped exec_stack when recursion limit is exceeded to prevent persistent command lockouts; in exists.c, guarded against out-of-bounds pointer advances and NULL dereferences in t_lex, isoperand, primary, and binop, and checked leftover tokens without modifying pointer; in expand.c, scoped backslash tracking per argument to prevent state leaking across arguments, used bu_vls_putc, and guarded against NULL string arguments; and in eye_pos.c, corrected unit conversion from dbi_base2local to dbi_local2base when converting user-specified eye coordinates to base units. |
|
||||
| `SEC-0249` | `src/libged/facetize/brep.cpp, src/libged/facetize/facetize.cpp, src/libged/facetize/nmg.cpp, src/libged/facetize/old_facetize.cpp, src/libged/facetize/old_facetize_log.c, src/libged/facetize/regions.cpp, src/libged/facetize/subprocess/brep_csg.cpp, src/libged/facetize/subprocess/continuation.cpp, src/libged/facetize/subprocess/main.cpp, src/libged/facetize/subprocess/nmg.cpp, src/libged/facetize/subprocess/sample.cpp, src/libged/facetize/subprocess/spsr.cpp, src/libged/facetize/subprocess/util.cpp, src/libged/facetize/tess_opts.h, src/libged/facetize/tri.cpp, src/libged/facetize/util.cpp` | `brep.cpp:115-235; facetize.cpp:115-125; nmg.cpp:215-230, 395-460; old_facetize.cpp:925-1055, 1200-1210, 1275-1315, 1375-1475, 1630-1640, 1915-1925; old_facetize_log.c:45-120; regions.cpp:145-165, 340-410, 810-850; brep_csg.cpp:145-160; continuation.cpp:125-140, 260-285; main.cpp:210-230, 520-530; nmg.cpp:65-75; sample.cpp:125-145; spsr.cpp:95-105; util.cpp:45-90; tess_opts.h:205-235; tri.cpp:335-345, 415-425, 1720-1745; util.cpp:445-470, 715-745` | Use-After-Free, Memory Leaks, Double-Free, Division by Zero, Out-of-bounds Memory Access, and Null Pointer Dereferences | 2 | `CONFIRMED` | `FIXED` | In BRL-CAD libged Batch 7 facetize commands (src/libged/facetize/*): in brep.cpp, fixed Cat 1 Use-After-Free of wgedp database handle across iterative meshing attempts, freed br ptbl and in_intern on early failure, and freed bot export allocations on write failure; in facetize.cpp, added argc <= 0 bounds checks in _ged_facetize_objs; in nmg.cpp, corrected 4 BU_PUT struct type mismatches freeing union tree nodes as struct directory, eliminated double-free of intern on rt_db_put_internal failure, and freed intern on db_diradd failure; in old_facetize.cpp, guarded against division by zero on obj_bbox_vol, freed temporary bot faces and vertices in continuation retry and abortion paths, eliminated duplicate bounding box check, ensured bot is freed on all decimation and validity failure exits, replaced mismatched calloc/bu_free with bu_calloc, and paired BU_GET with BU_PUT for manifold_mesh; in old_facetize_log.c, validated stderr file descriptor and guarded against NULL struct pointers in log redirection hooks; in regions.cpp, freed dpa directory array on lookup error, freed ir on search failure, handled wdbip reopen failure, freed tree_list nodes with BU_PUT, eliminated double-frees of eval_roots and ir, and cleaned up on bu_vls_incr error; in subprocess/brep_csg.cpp, fixed kill argument array bounds and layout; in subprocess/continuation.cpp, freed candidate bot on retry and continue paths, replaced incorrect BU_PUT pointer type with rt_bot_internal_free, and cleaned up bot on decimation failure; in subprocess/main.cpp, freed cache_dir on early help/list exits and added NULL check on seed; in subprocess/nmg.cpp, verified intern->idb_meth->ft_tessellate function pointer before invocation; in subprocess/sample.cpp, checked obj_bbox_vol with ZERO before division; in subprocess/spsr.cpp, validated point cloud array bounds and counts; in subprocess/util.cpp, added NULL and empty checks before decimate, write_bot, and manifold checks; in tess_opts.h, freed temporary bu_vls in method_optstr and fixed plate_max_time copy-paste error; in tri.cpp, eliminated duplicate curtree allocation, freed td_name on error paths, and used bu_calloc for bot vertices and faces; and in util.cpp, validated _ged_facetize_write_bot inputs, freed internal representation on diradd failure, and closed wdbip on error exits in _ged_facetize_working_file_setup. |
|
||||
| `SEC-0250` | `src/libged/fb2pix/fb2pix.c, src/libged/fbclear/fbclear.c, src/libged/form/form.c, src/libged/fracture/fracture.c, src/libged/garbage_collect/garbage_collect.cpp, src/libged/gdiff/gdiff.c, src/libged/ged.cpp, src/libged/ged_cmd_scanner.cpp, src/libged/ged_exec.cpp, src/libged/ged_init.cpp` | `fb2pix/fb2pix.c:50-130; fbclear/fbclear.c:45-80; form/form.c:50-80; fracture/fracture.c:55-195; garbage_collect/garbage_collect.cpp:110-185; gdiff/gdiff.c:50-55, 140-192, 280-295, 370-380; ged.cpp:552-556, 628-654, 735-742, 820-835, 840-900; ged_cmd_scanner.cpp:323-330; ged_exec.cpp:42-50, 95-103; ged_init.cpp:128-138, 160-170` | Memory Corruption, Memory Leaks, Resource Leaks, Catastrophic Data Loss Hazard, Recursion Lockout Bug, Division by Zero, Out-of-bounds Memory Access, and Null Pointer Dereferences | 2 | `CONFIRMED` | `FIXED` | In BRL-CAD libged Batch 8 core and command implementations: in fb2pix.c, validated image dimensions against non-positive values, modernized error logging, and guarded fclose against stdout/NULL; in fbclear.c, replaced floating-point comparison with ZERO/integer literals, supported unquoted RGB arguments, and routed error diagnostics to ged_result_str; in form.c, reordered argc check ahead of database check and reported unsupported form type errors to result string; in fracture.c, freed old_intern across all exits, prevented log10(0) domain error on empty model, fixed cross-model region bug where new shell pointed to old region shell list head, replaced static global frac_stat with local status, freed NMG model on db_diradd failure, and expanded newname/prefix buffers to 256 bytes; in garbage_collect.cpp, plugged memory leak of bu_external in object copy loop, guarded against division by zero on old_file_size, verified stream write success before deleting the original database to prevent data destruction, checked db_ls path count and validity, and ensured working file cleanup on errors; in gdiff.c, guarded tolerance retrieval against NULL wdbp, guarded path bounds, initialized rt_db_internal structures, freed in1 on in2 retrieval failure, validated ID_COMBINATION types, guarded msgs against NULL dereference, reordered db_lookup before allocating full paths, and checked raydiff results before access; in ged.cpp, resolved heap corruption caused by BU_PUT struct type mismatch freeing struct bu_list as struct bu_vls for gd_headDisplay and gd_headVDraw, zeroed ged_cbs on allocation with memset to prevent uninitialized counters triggering false recursive warnings, verified wdbp and dbip before creating ged struct in ged_open, decremented callback recursion depth before error return to prevent permanent callback lockout, and added NULL checks in callback handlers; in ged_cmd_scanner.cpp, eliminated duplicate and out-of-bounds argv checks in generated wrappers; in ged_exec.cpp, guarded argv[0] and argc before bu_setprogname and verified plugin function pointers before dispatch; in ged_init.cpp, allocated sentinel NULL termination for command array and guarded filenames before path lookup. |
|
||||
| `SEC-0251` | `src/libged/ged_inside.c, src/libged/ged_private.h, src/libged/ged_track.c, src/libged/ged_util.cpp, src/libged/get/get.c, src/libged/get_autoview/get_autoview.c, src/libged/get_comb/get_comb.c, src/libged/get_eyemodel/get_eyemodel.c, src/libged/get_obj_bounds.c, src/libged/get_solid_kp.c` | `ged_inside.c:130-170, 310-335, 430-490, 600-660, 720-790; ged_private.h:505-515; ged_track.c:160-230, 350-410, 480-550, 620-660; ged_util.cpp:110-140, 320-350, 610-670, 890-950; get/get.c:60-95; get_autoview/get_autoview.c:55-85; get_comb/get_comb.c:65-140; get_eyemodel/get_eyemodel.c:45-75; get_obj_bounds.c:70-130, 220-270; get_solid_kp.c:50-90, 150-220, 310-390` | Memory Leaks, Buffer Overflow, Double-Free, Division by Zero, Out-of-bounds Memory Access, and Null Pointer Dereferences | 2 | `CONFIRMED` | `FIXED` | In BRL-CAD libged Batch 9 utilities (ged_inside, ged_track, ged_util, get, get_autoview, get_comb, get_eyemodel, get_obj_bounds, get_solid_kp): in ged_inside.c, eliminated memory leaks of rt_db_internal on early returns and interactive prompt paths, fixed out-of-bounds argv[2] access on completion, cleared dangling idb_ptr after nmg_km to avoid double-free, fixed copy-paste typo in unit_d scaling (mag_b vs mag_c), and guarded against negative sqrt radicand and division by zero across tgc, ell, rpc, rhc, epa, ehy, and eto routines; in ged_track.c, resolved longstanding 30-year-old swap bug where tr[0] was overwritten with uninitialized tr[2], expanded track name allocations to prevent buffer overflow with multi-digit indices, replaced sprintf with snprintf, eliminated double-free of intern in wrobj, ensured track member lists are freed on all exits, and guarded acos and slope calculations against division by zero and domain errors; in ged_util.cpp, added array bounds checks in ged_results_get, validated wdbp and freed previous dbi_title in ged_dbcopy, added scale factor scan failure checks in ged_scale_args, guarded eye model functions against NULL pointers, freed intern on combadd2 region validation error, and passed correct element count to db_mkgift_tree; in get.c, freed internal representation and logged diagnostics when ft_get is unavailable, and guarded wdbp; in get_autoview.c, fixed option parsing bug where initial argc check rejected the -p flag, and validated remaining arguments; in get_comb.c, eliminated memory leaks of internal representation and rt_tree_array across all error exits, guarded wdbp, and formatted matrices with snprintf; in get_obj_bounds.c, enforced _GED_TRACE_MAX_LEVELS limit to prevent array overflow in gtd_obj, replaced free with bu_free, freed intern on rt_i_create failure, and validated ft_prep; in get_solid_kp.c, guarded input pointers against NULL, checked for empty list before accessing first node in pipe, metaball, and nmg handlers, and guarded vertex/curve pointers in bot, ars, poly, and extrude. |
|
||||
| `SEC-0252` | `src/libged/get_type/get_type.c, src/libged/glob/glob.c, src/libged/gqa/gqa.cpp, src/libged/graph/graph.cpp, src/libged/grid/grid.c, src/libged/grid2model_lu/grid2model_lu.c, src/libged/grid2view_lu/grid2view_lu.c, src/libged/group/group.c, src/libged/heal/heal.c, src/libged/help/help.cpp` | `get_type/get_type.c:45-75; glob/glob.c:130-175, 240-275, 340-395; gqa/gqa.cpp:155-165, 340-360, 560-580, 890-950, 1540-1590, 1680-1760, 1780-1880, 2600-2645, 2730-2815, 2885-2985; graph/graph.cpp:270-315, 640-675, 905-920, 1025-1055; grid/grid.c:38-60, 110-125, 280-310; grid2model_lu/grid2model_lu.c:50-65; grid2view_lu/grid2view_lu.c:50-60; group/group.c:50-65; heal/heal.c:54-85; help/help.cpp:35-105, 110-225, 260-285` | Memory Leaks, Buffer Overflow, Division by Zero, Out-of-bounds Memory Access, Logic Errors, and Null Pointer Dereferences | 2 | `CONFIRMED` | `FIXED` | In BRL-CAD libged Batch 10 commands (get_type, glob, gqa, graph, grid, grid2model_lu, grid2view_lu, group, heal, help): in get_type.c, validated argc and argv[1], initialized rt_db_internal before import, and guarded wdbp; in glob.c, added null checks to _debackslash, _backslash_specials, and _ged_expand_str_glob, checked gp->gl_pathv before string access, added per-word match counting to fall back to unescaping individual patterns when unmatched, and guarded argc and argv in ged_glob_core; in gqa.cpp, added null check on units buffer, constrained num_views (1..3) to prevent fixed-size array out-of-bounds access, guarded region and hit pointers against null in _gqa_overlap, initialized point arrays and passed valid pointer in _gqa_hit, bounded string traversal in find_cmd_line_obj, validated inputs and region count returning error on invalid state in allocate_per_region_data, removed redundant duplicate density file loading, fixed massive memory leaks of intern, density names, and avs across directories in densities_prep, prevented null dereference on strrchr, guarded against division by zero on state->shots across all views in view_reports, weight_volume_terminate, and summary_reports, guarded wdbp, rtip, obj_tbl, reg_tbl, and ged_gqa_plot.vbp before cleanup and destruction, and reset aborted state; in graph.cpp, checked ID_COMBINATION and pointers in process_comb and hl_scan_db, guarded child tree leaf names against null, verified file stream write success in hl_layout_and_output, removed redundant argument shifting in igraph mode and validated subcommand argument; in grid.c, guarded against null gv_s view state in grid_vsnap, grid_vls_print, and ged_grid_core, clamped user RGB color components to 0..255, and corrected error reporting parameter; in grid2model_lu.c, validated argv arguments and checked for zero denominator with ZERO macro before division; in grid2view_lu.c, guarded argv[1] and argv[2] against null; in group.c, validated group name and member arguments against null and empty strings; in heal.c, guarded arguments, clamped negative zipper tolerance, freed internal representation on non-BOT objects, and verified rt_db_put_internal return; in help.cpp, moved directory listing free inside directory traversal loop to eliminate directory listing leak, freed filepath on unreadable files, reset zeros counter per file so a binary file does not disable reading all subsequent documentation files, freed word buffer on each file exit, fixed cntptr type to size_t * preventing memory corruption, and checked bu_dir return before strdup while cleaning up resources when words == 0. |
|
||||
| `SEC-0253` | `src/libged/help/test_help.c, src/libged/hide/hide.c, src/libged/how/how.c, src/libged/human/human.c, src/libged/illum/illum.c, src/libged/importFg4Section/importFg4Section.c, src/libged/include/plugin.h, src/libged/inside/inside.c, src/libged/instance/instance.c, src/libged/isize/isize.c` | `help/test_help.c:30-45; hide/hide.c:45-120; how/how.c:40-75, 120-160; human/human.c:50-95, 2380-2505; illum/illum.c:40-95, 100-120, 150-175; importFg4Section/importFg4Section.c:45-75; inside/inside.c:55-75; instance/instance.c:50-75; isize/isize.c:35-55` | Resource Leaks, Buffer Overflow, Division by Zero, Out-of-bounds Memory Access, and Null Pointer Dereferences | 2 | `CONFIRMED` | `FIXED` | In BRL-CAD libged Batch 11 commands (test_help, hide, how, human, illum, importFg4Section, plugin.h, inside, instance, isize): in test_help.c, guarded ac and av pointers before calling bu_setprogname, and called ged_close before return to cleanly shut down GED resources; in hide.c, guarded argv[i] arguments against null or empty strings, tracked write and export failures, and corrected db5_export_object3 invocation; in how.c, initialized dpp, added null guards on hdlp, vls, dpp, and style struct pointer sp->s_os in dl_how, validated argument bounds and pointers, handled -b flag correctly, and guarded gd_headDisplay before traversal; in human.c, replaced process-terminating bu_exit calls with graceful error return in read_args, added null checks on fopen returns before writing to file pointers in text and verbose, validated argc, verified wdb_dbopen return, replaced unchecked sprintf with snprintf, and called wdb_close to eliminate persistent database handle leak; in illum.c, added GED_CHECK_DATABASE_OPEN, GED_CHECK_VIEW, GED_CHECK_DRAWABLE, and GED_CHECK_ARGC_GT_0 to ged_labelvert_core, guarded argv[i] arguments, checked dmp before calling dm_set_dirty, guarded gdlp and obj in dl_set_illum, validated directory pointer and d_namep, checked argv[1] against null using BU_STR_EQUAL, and verified gd_headDisplay; in importFg4Section.c, validated argc and argv pointers, verified wdb_dbopen return, and added wdb_close to eliminate database handle leak; in include/plugin.h, audited plugin macros; in inside.c, guarded argc and argv[1] against null and verified outdp; in instance.c, validated argument count and null/empty object and instance names, guarded argv[3] against null, and safely formatted invalid operation string; in isize.c, added GED_CHECK_DATABASE_OPEN to prevent null dereference of gedp->dbip, and guarded against division by zero using ZERO macro on base2local factor. |
|
||||
| `SEC-0254` | `src/libged/item/item.c, src/libged/joint/joint.c, src/libged/joint/joint.h, src/libged/joint2/joint2.c, src/libged/keep/keep.c, src/libged/keypoint/keypoint.c, src/libged/kill/kill.c, src/libged/killall/killall.c, src/libged/killrefs/killrefs.c, src/libged/killtree/killtree.c` | `item/item.c:45-80; joint/joint.c:120-140, 520-565, 875-920, 1100-1165, 1260-1310, 1480-1550, 2030-2070, 2180-2225, 2370-2440, 2900-2950; joint2/joint2.c:95-125, 220-255; keep/keep.c:95-155, 180-245; keypoint/keypoint.c:50-75; kill/kill.c:50-80; killall/killall.c:55-80; killrefs/killrefs.c:55-90; killtree/killtree.c:95-115, 230-265, 310-345` | Use-After-Free, Memory Corruption, Memory Leaks, Double-Free, Infinite Loop, Out-of-bounds Memory Access, and Null Pointer Dereferences | 2 | `CONFIRMED` | `FIXED` | In BRL-CAD libged Batch 12 commands (item, joint, joint2, keep, keypoint, kill, killall, killrefs, killtree): in item.c, validated argc range (3..6), guarded argv[1] and argv[2] against null, checked argv[3..5] before atoi, initialized rt_db_internal, and validated combination type freeing intern on mismatch; in joint.c, eliminated Cat 1 Use-After-Free in parse_hold by adding missing return after free_hold on EOF, fixed 64-bit struct member memory corruption where hp->priority was passed as double * clobbering flag, fixed infinite loop in joint_move dirs parsing by adding missing argv/argc increment, guarded against division by zero in parse_units with ZERO macro, eliminated persistent memory leaks in free_hold, part_solve, and joint_load by freeing arc sets, joint handles, and bu_vls, added null guards across hold_point_to_string, joint_unload, parse_error, joint_mesh, joint_save, joint_accept, joint_reject, reject_move, joint_solve, joint_hold, joint_move, and joint_cmd, fixed copy-paste typo in joint_reject usage, and corrected return status logic in joint_solve; in joint2.c, verified callback function pointers and selection counts, added bounds check preventing out-of-bounds read of argv[2] when argc == 2, and eliminated Cat 1 Double-Free of intern after GED_DB_PUT_INTERN; in keep.c, guarded directory and component pointers in node_write, closed incoming database on format mismatch and open failures to eliminate file descriptor leaks, and used wdb_close on all exits to properly release wdbp and underlying dbip; in keypoint.c, guarded argv[1..3] against null before bn_decode_vect and sscanf; in kill.c, enforced required object name argument after option stripping and guarded argv[i] in deletion loops; in killall.c, guarded argv[1] on -n check and enforced argument counts reporting usage; in killrefs.c, guarded argv[1], enforced argument count, guarded display erasure and tree deletion loops, and validated combination types; in killtree.c, guarded directory and data pointers in callbacks, enforced argument count after option parsing, guarded argv[i] in processing loop, and unconditionally freed argv allocations to eliminate -n memory leak. |
|
||||
| `SEC-0255` | `src/libged/label/label.c, src/libged/lc/lc.c, src/libged/libfuncs/libfuncs.c, src/libged/lint/cyclic.cpp, src/libged/lint/ged_lint.h, src/libged/lint/invalid_shape.cpp, src/libged/lint/lint.cpp, src/libged/lint/lint_bot.cpp, src/libged/lint/missing.cpp, src/libged/lint/raytrace.cpp` | `label/label.c:45-65; lc/lc.c:50-70, 195-215, 290-370, 520-565; libfuncs/libfuncs.c:50-70, 85-105, 120-140, 150-170; lint/cyclic.cpp:60-80, 105-140, 190-210; lint/invalid_shape.cpp:55-90, 125-155; lint/lint.cpp:80-95, 235-265, 410-440; lint/lint_bot.cpp:115-135, 160-195, 255-275, 435-455, 615-705; lint/missing.cpp:65-75, 85-145, 160-205; lint/raytrace.cpp:160-180, 195-215` | Use-After-Free, Memory Leaks, Resource Leaks, Integer Underflow, Division by Zero, Out-of-bounds Memory Access, and Null Pointer Dereferences | 2 | `CONFIRMED` | `FIXED` | In BRL-CAD libged Batch 13 commands (label, lc, libfuncs, lint): in label.c, validated argc and argv bounds before dereferencing argv[0] on help output; in lc.c, guarded against null struct pointers and string fields before bu_strcmp and atoi in cmp_regions and sort_regions, validated argc and argv in ged_lc_core, handled bu_file_realpath null returns and freed norm_name on errors, closed output file and freed vls on error exits, freed results1 and results2 search tables via db_search_free, freed db_full_path root, duplicated attribute strings and freed all duplicated strings on all exits to eliminate Cat 1 Use-After-Free of stack-scoped avs attributes, and replaced descending size_t loop with reverse counting loop to prevent unsigned integer underflow; in libfuncs.c, guarded argv, argv[0], argv[1], and argv[2] before bu_sscanf, bn_decode_mat, and bn_decode_vect across mat_ae, mat_mul, mat4x3pnt, and mat_scale_about_pnt, and added missing newlines to usage strings; in lint/cyclic.cpp, freed path strings allocated by db_path_to_string, replaced process-terminating bu_bomb with graceful error logging, initialized rt_db_internal, and validated ID_COMBINATION and combination pointers; in lint/ged_lint.h, audited header declarations; in lint/invalid_shape.cpp, initialized intern, eliminated memory leaks of BREP, ARB8, DSP, and EXTRUDE internal representations on early returns by calling rt_db_free_internal across all exits, properly initialized and freed pc search table, and guarded directory pointers; in lint/lint.cpp, guarded ostr.pop_back() against empty problem vectors, validated key_val parsing, fixed off-by-one underflow in argument verification loop that caused argv[-1] out-of-bounds reads, freed combination members with mk_freemembers after mk_lcomb, and initialized is_region; in lint/lint_bot.cpp, validated triangle vertex indices against num_vertices and guarded normal magnitude before division in bot_face_normal, bounded triangle indices and vertex indices in tri_to_json and plot_bad_tris, guarded map iterator dereference in bot_check, clamped ncpus to num_faces, set last worker end to num_faces so the final triangle face is not skipped, cleaned per-worker resources with rt_clean_resource, and freed worker state array to eliminate thread resource and memory leaks; in lint/missing.cpp, replaced bu_bomb with graceful error logging, added buffer size checks against header lengths before pointer arithmetic in shape_find_missing to prevent buffer over-reads in DSP and EXTRUDE objects, and initialized and freed rt_db_internal structures across all exits; in lint/raytrace.cpp, verified ID_COMBINATION and tree pointers before traversing combination trees in subtree_has_halfspace and collect_subtree. |
|
||||
| `SEC-0256` | `src/libged/list/list.c, src/libged/lod/lod.c, src/libged/lod/lod2.cpp, src/libged/log/log.c, src/libged/ls/ls.c, src/libged/lt/lt.c, src/libged/m2v_point/m2v_point.c, src/libged/make/make.c, src/libged/make_name/make_name.c, src/libged/man/man.c` | `list/list.c:55-140; lod/lod.c:50-115; lod/lod2.cpp:35-45; log/log.c:35-90; ls/ls.c:60-170, 290-340, 420-505; lt/lt.c:40-110, 125-155; m2v_point/m2v_point.c:50-80; make/make.c:85-185; make_name/make_name.c:45-95; man/man.c:60-105, 135-215` | Memory Leaks, Resource Leaks, Integer Overflow, Infinite Loop, and Null Pointer Dereferences | 2 | `CONFIRMED` | `FIXED` | In BRL-CAD libged Batch 14 commands (list, lod, lod2, log, ls, lt, m2v_point, make, make_name, man): in list.c, validated argc and argv bounds, added missing newline to usage, guarded argv[arg] against null before slash search, closed wdbp immediately after copying initial tree state to prevent wdbp handle leak, freed full path on traversal failures, initialized and freed internal structures, and guarded describe callbacks; in lod.c, checked argv bounds, guarded against null gvp and gvp->gv_s view state pointers before member access, validated non-negative scale factors using bu_sscanf, and guarded argv subcommands against null; in lod2.cpp, guarded gedp and ged_result_str against null before writing result; in log.c, guarded clientdata and str in log_hook, checked gedp->ged_log before hook operations and log dumps, validated argv[1], and added missing newlines to usage messages; in ls.c, guarded list_of_names and num_in_list in vls_long_dpp and vls_line_dpp, guarded directory pointers and names against null, initialized and freed intern representations, guarded ft_label and binunif typestrings before string length operations, guarded name and type widths against unsigned underflow, guarded argv in _ged_ls_attr_objs and _ged_ls_named_objs, guarded results_obj before formatting, and freed str vls on all exit paths to eliminate memory leaks; in lt.c, initialized intern, validated ID_COMBINATION and pointers before accessing comb tree, freed intern and vls on flatten tree error exit paths to eliminate memory leaks, guarded tree leaf names against null, and validated argv bounds and option characters; in m2v_point.c, guarded argv arguments, added missing newlines to usage, and replaced raw sscanf with bu_sscanf; in make.c, validated positive scale factors, guarded extrude_ip and freed internal on error, replaced sprintf with snprintf, and called rt_db_free_internal on db_diradd failure to eliminate primitive internal memory leaks; in make_name.c, validated argv pointers, added missing newlines, parsed -s argument with bu_sscanf ensuring non-negative index, added loop bounds and overflow guards in candidate generation loop, and avoided redundant null byte injection; in man.c, checked argv bounds, verified brlman path existence, freed lang vls on all early returns to eliminate memory leaks, cleaned up failed subprocess handles with bu_process_wait_n, and waited for CLI mode processes to exit cleanly. |
|
||||
|
||||
| `SEC-0257` | `src/libged/match/match.c, src/libged/mater/mater.cpp, src/libged/material/material.c, src/libged/metaball/metaball.c, src/libged/mirror/mirror.c, src/libged/model2grid_lu/model2grid_lu.c, src/libged/model2view/model2view.c, src/libged/model2view_lu/model2view_lu.c, src/libged/move/move.c, src/libged/move_all/move_all.c` | `match/match.c:45-80; mater/mater.cpp:245-285, 335-375, 485-535, 620-675, 935-970, 1630-1715; material/material.c:95-175, 230-315, 330-380, 420-475, 510-580, 610-660; metaball/metaball.c:165-200, 240-275, 320-355, 410-445; mirror/mirror.c:115-185; model2grid_lu/model2grid_lu.c:50-80; model2view/model2view.c:50-75; model2view_lu/model2view_lu.c:50-80; move/move.c:75-135; move_all/move_all.c:115-185, 280-340` | Memory Corruption, Resource Leaks, Memory Leaks, Out-of-bounds Memory Access, Integer Underflow, and Null Pointer Dereferences | 2 | `CONFIRMED` | `FIXED` | In BRL-CAD libged Batch 15 commands (match, mater, material, metaball, mirror, model2grid_lu, model2view, model2view_lu, move, move_all): in match.c, added missing newline to usage, guarded argv pointers against null, replaced unchecked pointer increment loop with safe index-bounded loop, and guarded dp and dp->d_namep before bu_path_match; in mater.cpp, freed d_path_dir vls across all exits, closed wdbp handle with wdb_close in mater_import, safely parsed mat_id with bu_sscanf before comparison, eliminated heap allocations for std::set and msgs to prevent memory leaks, freed new_buf from analyze_densities_write and bin_ext on db_dirbuild failure, replaced dynamic heap avs allocation with stack struct and ensured bu_avs_free is invoked on all iterations and exits, guarded oname before std::string conversion, safely parsed integer IDs, returned BRLCAD_ERROR on fail, and freed nname before early returns; in material.c, eliminated Cat 1 memory corruption by removing illegal bu_free on stack buffer, closed densityTable file descriptor on all paths, closed wdbp handle with wdb_close on all exits across import, create, set, and remove, freed AVS property tables on each loop iteration and exit, validated argc bounds before accessing argv indices, guarded string parsing loop against integer underflow, verified ID_MATERIAL internal type before accessing material structure, called rt_db_free_internal on all exit paths, prevented orphaning of bu_vls string buffers by using bu_vls_strcpy/bu_vls_trunc instead of BU_VLS_INIT, and propagated subcommand error return codes; in metaball.c, closed wdbp handle on all paths, verified DB5_MINORTYPE_BRLCAD_METABALL before casting internal pointer, replaced raw sscanf with bu_sscanf, fixed out-of-bounds pointer dereference of argv[3] when argc was 3 in delete error message, and added missing newlines to usage messages; in mirror.c, called rt_db_free_internal on all exit paths after rt_db_get_internal to eliminate primitive memory leaks, replaced raw sscanf with bu_sscanf, and guarded argv pointers against null; in model2grid_lu.c and model2view_lu.c, moved matrix dereferences after GED_CHECK_DATABASE_OPEN to prevent null dereference of gedp, guarded argv arguments, replaced sscanf with bu_sscanf, and added missing newlines; in model2view.c, guarded argv arguments, replaced raw sscanf with bu_sscanf, and added missing newline to usage; in move.c and move_all.c, called rt_db_free_internal after rt_db_put_internal to eliminate memory leaks, replaced libc free with bu_free on heap strings allocated by bu_strdup, safely updated display list path strings, guarded old and new name arguments against null, and fixed format parameter mismatch in name length limit error message. |
|
||||
| `SEC-0258` | `src/libged/move_arb_edge/move_arb_edge.c, src/libged/move_arb_face/move_arb_face.c, src/libged/mrot/mrot.c, src/libged/nirt/nirt.cpp, src/libged/nmg/nmg.c, src/libged/nmg/nmg_cmface.c, src/libged/nmg/nmg_collapse.c, src/libged/nmg/nmg_fix_normals.c, src/libged/nmg/nmg_kill_f.c, src/libged/nmg/nmg_kill_v.c` | `move_arb_edge/move_arb_edge.c:65-135, 180-230, 275-320; move_arb_face/move_arb_face.c:90-155, 175-240; mrot/mrot.c:50-75; nirt/nirt.cpp:210-265, 335-360, 395-425, 475-495, 550-565, 615-635, 695-755; nmg/nmg.c:40-95, 105-180, 205-285; nmg/nmg_cmface.c:65-155; nmg/nmg_collapse.c:50-155; nmg/nmg_fix_normals.c:55-95; nmg/nmg_kill_f.c:35-70, 95-135; nmg/nmg_kill_v.c:35-255, 275-315` | Memory Corruption, Use-After-Free, Memory Leaks, Resource Leaks, Out-of-bounds Memory Access, and Null Pointer Dereferences | 2 | `CONFIRMED` | `FIXED` | In BRL-CAD libged Batch 16 commands (move_arb_edge, move_arb_face, mrot, nirt, nmg, nmg_cmface, nmg_collapse, nmg_fix_normals, nmg_kill_f, nmg_kill_v): in move_arb_edge.c, closed wdbp handle on all exit paths in move_arb_edge and find_arb_edge, called rt_db_free_internal after rt_db_put_internal to eliminate memory leaks, guarded argv pointers against null, replaced raw sscanf with bu_sscanf, and added missing newlines to usage and error messages; in move_arb_face.c, eliminated Cat 1 memory corruption and stack array overflow by enforcing face bounds check on both positive and negative indices for the specific arb_type before modifying planes array, closed wdbp handle on all paths, called rt_db_free_internal after rt_db_put_internal, returned BRLCAD_ERROR when object is not an ARB, replaced sscanf with bu_sscanf, and added missing newlines; in mrot.c, validated argv and argv[i] pointers against null, and added missing newlines; in nirt.cpp, eliminated Cat 1 heap corruption on subprocess failure by replacing incorrect cast and free of string pointers as bu_vls structures with bu_free, fixed use of freed av_args and memory leak of obj by directly emitting draw commands to stdin in skip_drawn block, freed nirt exec string and nv options across all error returns, corrected loop to inspect argv[i] instead of repeatedly checking argv[0], freed dpv allocated by db_ls, fixed off-by-4 bug in ged_vnirt_core where av[i] = NULL clobbered argument pointers, replaced sscanf with bu_sscanf, guarded ged_gdp before dl_set_wflag, and added missing newlines; in nmg.c, eliminated Cat 1 linked list corruption in get_face_list where actual model face list pointers were stolen into stack f_list causing circular loops and free crashes by using detached copy structs, freed internal representations and face list allocations, fixed off-by-one subcommand lookup in ged_nmg_core where subcmd was erroneously read from argv[0] instead of argv[1], guarded argv[2] before dereferencing in kill, move, and make subcommands, and propagated subcommand return codes; in nmg_cmface.c, freed verts buffer to eliminate persistent memory leaks, closed wdbp handle on all paths, replaced atof with bu_sscanf, corrected variable in error message, and added missing newlines; in nmg_collapse.c, closed wdbp on all exit paths, freed internal representation on non-planar face detection, validated tolerances with bu_sscanf and ZERO macro, and added missing newlines; in nmg_fix_normals.c, persisted fixed normals to database via rt_db_put_internal, freed internal representation, and added missing newlines; in nmg_kill_f.c, eliminated Cat 1 Use-After-Free in remove_face by immediately returning once target face is destroyed by nmg_kfu, closed wdbp on all paths, parsed fid with bu_sscanf, and added missing newlines; in nmg_kill_v.c, eliminated Cat 1 Use-After-Free and Double-Free in remove_vertex by restarting topology search on each deletion instead of continuing iteration on freed loopuses and edgeuses, closed wdbp on all paths, parsed coordinates with bu_sscanf, and added missing newlines. |
|
||||
| `SEC-0259` | `src/libged/nmg/nmg_make_v.c, src/libged/nmg/nmg_mm.c, src/libged/nmg/nmg_move_v.c, src/libged/nmg/nmg_simplify.c, src/libged/npush/npush.cpp, src/libged/ocenter/ocenter.c, src/libged/open/open.cpp, src/libged/orient/orient.c, src/libged/orotate/orotate.c, src/libged/oscale/oscale.c` | `nmg/nmg_make_v.c:60-135; nmg/nmg_mm.c:45-75; nmg/nmg_move_v.c:280-325; nmg/nmg_simplify.c:90-105, 235-295; npush/npush.cpp:1190-1285, 1380-1445, 1670-1705; ocenter/ocenter.c:55-108; open/open.cpp:55-87, 135-150; orient/orient.c:45-80; orotate/orotate.c:60-125; oscale/oscale.c:60-115` | Use-After-Free, Memory Leaks, Resource Leaks, Out-of-bounds Memory Access, Logic Errors, and Null Pointer Dereferences | 2 | `CONFIRMED` | `FIXED` | In BRL-CAD libged Batch 17 commands (nmg_make_v, nmg_mm, nmg_move_v, nmg_simplify, npush, ocenter, open, orient, orotate, oscale): in nmg_make_v.c, validated vertex coordinates with bu_sscanf, closed wdbp handle with wdb_close on error and success paths, freed verts buffer on wdb_put_internal failure, and added missing newlines to usage and error strings; in nmg_mm.c, freed internal representation on db_diradd failure to prevent memory leak, checked rt_db_put_internal return status, and added missing newline to usage; in nmg_move_v.c, validated 6 coordinate arguments using bu_sscanf, closed wdbp handle on error and success exits, reported correct object name on error, and added missing newline to usage; in nmg_simplify.c, eliminated Cat 1 Use-After-Free and database corruption where failure of all conversion methods (arb/tgc/poly) fell through to out1: attempting to add and write a freed/stale new_intern, closed wdbp handle on all exit paths in out3:, and added missing newlines to usage strings; in npush.cpp, eliminated persistent leak of rt_wdb handle by immediately copying tolerance and closing wdbp, freed temporary msgs vls on early exit in non-verbose conflict path, added missing newlines to conflict and error messages, and preserved all missing/added tops reports by using bu_vls_printf instead of bu_vls_sprintf; in ocenter.c, added bounds check on gtd.gtd_objpos to prevent negative array indexing out-of-bounds, replaced sscanf with bu_sscanf, and added missing newlines to usage and error strings; in open.cpp, added missing newlines in usage and error strings, returned BRLCAD_OK when print_help is requested, and safely destroyed existing ged_lod context and dbi_state before reassigning; in orient.c, fixed off-by-one error in error reporting where argv[i-1] was printed instead of argv[i], replaced sscanf with bu_sscanf, and added missing newlines to usage strings; in orotate.c, added bounds check on gtd.gtd_objpos to prevent out-of-bounds array access, replaced sscanf with bu_sscanf, and added missing newlines to usage and error strings; in oscale.c, added scale factor validation with bu_sscanf and SQRT_SMALL_FASTF to prevent degenerate or non-positive scaling, added bounds check on gtd.gtd_objpos, and added missing newlines to usage and error strings; |
|
||||
| `SEC-0260` | `src/libged/osg.cpp, src/libged/otranslate/otranslate.c, src/libged/overlay/overlay.c, src/libged/path.c, src/libged/pathlist/pathlist.c, src/libged/pathsum/pathsum.c, src/libged/perspective/perspective.c, src/libged/pipe/pipe.c, src/libged/pix2fb/pix2fb.c, src/libged/plot/plot.c` | `osg.cpp:55-75, 150-165; otranslate.c:55-90; overlay.c:105-160, 195-225, 250-290; path.c:45-75; pathlist.c:35-105; pathsum.c:75-125; perspective.c:50-80; pipe.c:65-145, 170-235, 255-315, 340-435; pix2fb.c:70-175, 180-235; plot.c:50-60, 210-285` | Resource Leaks, Double-Free, Buffer Overflow, Logic Errors, Out-of-bounds Memory Access, and Process Termination in Library Function | 2 | `CONFIRMED` | `FIXED` | In BRL-CAD libged Batch 18 commands (osg, otranslate, overlay, path, pathlist, pathsum, perspective, pipe, pix2fb, plot): in osg.cpp, added NULL pointer checks to _osgLoadHiddenSolid, _osgLoadSolid, and _ged_osgLoadScene, and verified osp->viewer validity; in otranslate.c, added bounds check on gtd.gtd_objpos preventing negative out-of-bounds array access, replaced sscanf with bu_sscanf, and added missing newlines to usage and error strings; in overlay.c, fixed out-of-bounds / null pointer dereference on argv[1] when bu_file_list returned <= 0 by changing to argv[0], freed vbp on fopen failure inside loop to eliminate memory leak, preserved cmd_name for diagnostics, and added missing newlines; in path.c, fixed critical logic flaw where the return value of path_validate_recurse was ignored allowing invalid paths to pass validation, checked intern.idb_type == ID_COMBINATION, and added missing newline; in pathlist.c, eliminated persistent wdbp database handle leak by immediately calling wdb_close after reading initial tree state, replaced static mutable global pathListNoLeaf with thread-safe struct pathlist_data passed via client_data, checked fp_len > 1 before decrement, and added missing newlines; in pathsum.c, checked _GED_TRACE_MAX_LEVELS upper bound to prevent stack buffer overflow in gtd.gtd_obj, duplicated path argument before calling strtok to avoid in-place mutation of argv and thread safety issues, and added missing newlines; in perspective.c, replaced sscanf with bu_sscanf, added angle range check [0, 180) to prevent division by zero or singularity in persp_mat, and added missing newlines; in pipe.c, eliminated persistent wdbp leaks by calling wdb_close across append, find, and move commands, fixed out-of-bounds argv[3] access when argc == 3 in delete command by correcting to argv[2], eliminated double-free hazards of intern following GED_DB_PUT_INTERN, replaced sscanf with bu_sscanf, checked seg_i >= 0, and added missing newlines; in pix2fb.c, eliminated process termination bug where bu_exit was invoked on file open failure by returning error and logging to ged_result_str, fixed usage string repetition, checked infd > 0 before close, and formatted error messages with argv[0] and newlines; in plot.c, removed mutable static local variables in dl_plot making it reentrant and thread-safe, preserved cmd_name before advancing argv, freed bu_vls str on popen failure, formatted system errors with strerror(errno) into result string, and added missing newlines. |
|
||||
| `SEC-0261` | `src/libged/pmat/pmat.c, src/libged/pmodel2view/pmodel2view.c, src/libged/png/png.c, src/libged/png2fb/png2fb.c, src/libged/pnts/pnts.cpp, src/libged/pnts_util.c, src/libged/pnts_util.h, src/libged/points_eval.c, src/libged/polyclip.cpp, src/libged/prcolor/prcolor.c` | `pmat/pmat.c:50-65; pmodel2view/pmodel2view.c:45-55; png/png.c:40-105, 148-185, 320-475; png2fb/png2fb.c:55-70, 120-135, 150-185; pnts/pnts.cpp:105-150, 340-348, 478-486, 604-612, 646-700, 810-818, 900-1045, 1070-1130, 1220-1225, 1450-1460, 1538-1555, 1585-1595; pnts_util.c:125-215, 295-410; points_eval.c:45-65; polyclip.cpp:45-55, 125-140, 168-185, 280-286, 305-316, 350-370, 570-585; prcolor/prcolor.c:84-95, 106-118` | Memory Leaks, Resource Leaks, Buffer Overflow, Infinite Loop, In-place Argument Mutation, and Null Pointer Dereferences | 2 | `CONFIRMED` | `FIXED` | In BRL-CAD libged Batch 19 commands (pmat, pmodel2view, png, png2fb, pnts, pnts_util, pnts_util.h, points_eval, polyclip, prcolor): in pmat.c, added diagnostic error message on bn_decode_mat failure and fixed usage formatting; in pmodel2view.c, added missing newline to usage string; in png.c, encapsulated mutable globals in struct png_state, removed static locals from draw_png_solid for thread safety, clamped raster coordinates against image bounds to prevent buffer overflow, clamped img_size to prevent integer overflow in buffer allocation, replaced raw sscanf with bu_sscanf, freed image and bytes buffers and destroyed libpng structures via png_destroy_write_struct on all error and success exits to eliminate persistent memory leaks, and added missing newlines to usage and error messages; in png2fb.c, removed duplicate usage prefix, distinguished file open failure from help request returning error instead of printing usage, replaced stderr writes with bu_log, and added missing newlines; in pnts.cpp, added bounds checks in _pnts_collect_arrays linked list loops to prevent heap buffer overflow, eliminated in-place mutation of caller argv in _ged_pnts_cmd_tri and ged_pnts_core by passing offset pointers and lengths to bu_cmd, propagated subcommand return codes, fixed unsafe argc decrement when argc <= 0, freed fl and unit vls structures on all exits in _ged_pnts_cmd_read, used RAII guard for pnt_str in _ged_pnts_cmd_write to eliminate persistent memory leak on every write operation, freed intern on fopen failure, and added missing newlines to result and error strings; in pnts_util.c, added NULL pointer checks to _ged_pnt_v_set, _ged_pnt_c_set, _ged_pnt_s_set, _ged_pnt_n_set, _ged_pnts_init_head_pnt, _ged_pnts_add, and _ged_pnts_dup; in points_eval.c, guarded d->dbip against NULL, checked fp->fp_len > 0 before calling DB_FULL_PATH_CUR_DIR, and properly initialized intern; in polyclip.cpp, closed wdbp database handles on all exit paths in ged_import_polygon, ged_polygons_overlap, and ged_polygon_fill_segments to eliminate persistent handle leaks, guarded input pointers, validated vfilldelta > SMALL_FASTF to prevent infinite loop hang, freed all 2D polygon contours, contour points, hole arrays, and result_vls on completion in ged_polygon_fill_segments to eliminate massive memory leak, and freed intern on export failure; in prcolor.c, replaced sprintf with snprintf to prevent buffer overflow, and added missing newlines to usage and none output. |
|
||||
| `SEC-0262` | `src/libged/prefix/prefix.c, src/libged/process/process.c, src/libged/ps/ps.c, src/libged/pset/pset.c, src/libged/pull/pull.c, src/libged/push/push.c, src/libged/put/put.c, src/libged/put_comb/put_comb.c, src/libged/putmat/putmat.c, src/libged/qray.cpp` | `prefix.c:45-65, 85-175; process.c:54-105, 112-175, 176-220; ps.c:91-135, 229-270, 329-440; pset.c:37-65, 86-150; pull.c:68-135, 169-245, 265-295; push.c:70-95, 200-295; put.c:51-115; put_comb.c:128-165, 355-450, 498-560; putmat.c:52-145, 191-250; qray.cpp:45-55, 78-105, 116-170` | Memory Corruption, Resource Leaks, Double-Free, Pointer Cast Error, and Underflows | 2 | `CONFIRMED` | `FIXED` | In BRL-CAD libged Batch 20 commands (prefix, process, ps, pset, pull, push, put, put_comb, putmat, qray): in prefix.c, removed leftover debugging bu_log prints, guarded prefix against empty string, guarded directory names against null/empty in rename loop, freed tempstring_v5 on all early error exits to eliminate memory leaks, validated intern.idb_type == ID_COMBINATION before tree walk, and added missing newlines to usage and error strings; in process.c, fixed Cat 1 integer underflow and memory exhaustion in _ged_process_list where longest_pid < 3 underflowed longest_pid - 3 to UINT_MAX - 2 when passed to %*c in bu_vls_sprintf, freed cmdroot before return in _ged_process_gabort to eliminate memory leak, added null guards on subprocess pointers, streamlined subcommand dispatch in ged_process_core to properly display help on unrecognized or malformed arguments, and added missing newlines; in ps.c, removed mutable static local variables in ps_draw_solid making it reentrant and preventing state leakage between solids, replaced sscanf with bu_sscanf, changed early return on bad color to goto bad so font, title, and creator are freed on error, guarded sp and hdlp against null in ps_draw_body, guarded bu_optind > 0 before accessing argv[bu_optind-1], and added missing newlines to usage and error strings; in pset.c, replaced sscanf with bu_sscanf, guarded attribute against null and empty string in _ged_set_metaball, clamped threshold when ZERO(threshold), guarded argv arguments against null, simplified cleanup to unconditionally call rt_db_free_internal(&intern) whenever ret != BRLCAD_OK, and added missing newlines; in pull.c, fixed Cat 1 pointer cast corruption in pull_leaf where mp (mat_t *) was cast to struct bu_vls * and passed to bu_vls_printf, fixed massive memory leak where modified primitives transformed by ft_xform were never written back or freed by adding rt_db_put_internal and rt_db_free_internal, fixed option parsing bug in ged_pull_core where argc != 2 check and db_lookup preceded bu_getopt making -d impossible to pass, passed (matp_t)NULL instead of 0-matrix m to rt_db_get_internal in pull_comb, freed intern on empty comb trees, checked return of bn_mat_inverse, and added missing newlines; in push.c, eliminated persistent resource leak of wdbp by immediately extracting init_state and calling wdb_close(wdbp), guarded argc < 1 after option stripping, guarded null directory and database pointers and freed intern on empty comb trees in identitize, and added missing newlines; in put.c, eliminated Cat 1 double-free of intern where rt_db_free_internal(&intern) was called after wdb_put_internal (which unconditionally frees the internal structure on both success and failure), closed wdbp with wdb_close(wdbp) on both error and success paths to eliminate handle leak, guarded argv[1] and argv[2] against null and empty strings, and added missing newlines; in put_comb.c, eliminated Cat 1 buffer underflow in trailing space stripping loop where empty or all-space names decremented i below 0 and accessed name[-1], fixed logic bug in mktemp_comb where db_lookup checked template string str instead of candidate name, freed rt_tree_array on error and success paths in put_tree_into_comb_and_export to eliminate persistent memory leak, freed intern on db_diradd failure in save_comb, replaced sscanf with bu_sscanf and guarded null str in put_rgb_into_comb, and added missing newlines; in putmat.c, eliminated Cat 1 memory leaks of name1 and name2 in _getmat where bu_vls_free was omitted on all successful matrix retrieval paths, removed machine-identifiable paths from error messages, guarded against null argv[1] and argv[2], and added missing newlines; in qray.cpp, fixed Cat 1 out-of-bounds string access in qray_init when parsing format lines shorter than expected, and added null pointer checks on gdp, gdp->gd_qray_fmts, and vhead in qray_init, qray_free, and qray_data_to_vlist. |
|
||||
| `SEC-0263` | `src/libged/qray.h, src/libged/qray/qray.c, src/libged/rcodes/rcodes.c, src/libged/rect/rect.c, src/libged/red/red.c, src/libged/regdef/regdef.c, src/libged/region/region.c, src/libged/repair/repair.cpp, src/libged/rfarb/rfarb.c` | `qray.h:35-45; qray/qray.c:65-105, 140-185, 230-310, 395-430; rcodes/rcodes.c:55-80, 95-170; rect/rect.c:60-95, 115-185, 210-250, 440-490; red/red.c:135-180, 230-320, 410-530, 680-740, 890-970; regdef/regdef.c:40-100; region/region.c:50-110; repair/repair.cpp:35-145; rfarb/rfarb.c:65-175, 215-240` | Double-Free, Memory Leaks, Division by Zero, Uninitialized Memory Reads, Pointer Aliasing, and Missing Validation | 2 | `CONFIRMED` | `FIXED` | In BRL-CAD libged Batch 21 commands (qray, qray.h, quit, rcodes, rect, red, regdef, region, repair, rfarb): in qray.h, fixed macro parameter bug in DG_QRAY_BOTH; in qray/qray.c, added null checks on gedp->i and gedp->i->ged_gdp across all entry points, replaced sscanf with bu_sscanf, corrected typo in command name, and added missing newlines to error strings; in quit/quit.cpp, verified clean with no changes needed; in rcodes/rcodes.c, eliminated Cat 1 double-free of intern on rt_db_put_internal failure (which unconditionally frees intern internally), eliminated persistent memory leak by freeing intern when changed == 0 or when non-combination objects are encountered, replaced sscanf with bu_sscanf, added null and empty string checks on argv[1], and added missing newlines to usage and error messages; in rect/rect.c, added null check on gedp->ged_gvp->gv_s, added ZERO(grsp->aspect) and cdim <= 0 checks to prevent division by zero in rect_image2view and rect_adjust_for_zoom, validated user coordinate dimensions to prevent division by zero, replaced sscanf with bu_sscanf, guarded argv[0] and argv[1] against null, and added missing newlines; in red/red.c, eliminated mutable file-scope static global buffer _ged_tmpfil by passing stack-allocated buffer into build_comb and write_comb to ensure thread safety, eliminated persistent memory leaks of rt_tree_array across all error and success exits in both build_comb and write_comb, freed intern on all early error paths in build_comb and after write_comb in ged_red_core, freed allocated matrix on error in _ged_find_matrix, replaced sprintf with snprintf to prevent buffer overflow, and added missing newlines; in regdef/regdef.c, guarded wdbp against null return from wdb_dbopen, replaced sscanf with bu_sscanf, and added missing newlines to usage and output strings; in region/region.c, guarded wdbp against null, guarded argv[1], argv[i], and argv[i+1] against null/empty, and added missing newlines to usage and error strings; in repair/repair.cpp, added GED_CHECK_DATABASE_OPEN, GED_CHECK_READ_ONLY, and GED_CHECK_ARGC_GT_0 guards, handled bu_opt_parse error returns, eliminated Cat 1 double-free of intern by only freeing intern when ft_repair returns non-zero (rt_db_put_internal unconditionally frees intern on both success and failure), guarded argv[i] against null/empty, and added newlines to JSON status messages; in rfarb.c, eliminated Cat 1 double-free of internal on rt_db_put_internal failure and returned BRLCAD_ERROR, eliminated memory leak of internal on db_diradd failure, prevented uninitialized stack coordinate usage by returning BRLCAD_ERROR when bu_sscanf coordinate parsing fails, replaced sscanf with bu_sscanf, guarded argv against null, and added missing newlines to all error and usage messages. |
|
||||
| `SEC-0264` | `src/libged/rm/rm.c, src/libged/rmap/rmap.c, src/libged/rmat/rmat.c, src/libged/rmater/rmater.c, src/libged/rot/rot.c, src/libged/rot/rotate_about.c, src/libged/rot_point/rot_point.c, src/libged/rrt/rrt.c, src/libged/rt/rt.c, src/libged/rtabort/rtabort.c` | `rm/rm.c:555-575, 895-925, 1190-1215; rmap/rmap.c:45-145; rmat/rmat.c:48-65; rmater/rmater.c:30-75, 100-155; rot/rot.c:35-46; rot/rotate_about.c:45-66; rot_point/rot_point.c:50-85; rrt/rrt.c:52-68; rt/rt.c:80-132; rtabort/rtabort.c:52-73` | Stack Buffer Overflow, Memory Leaks, Logic Inversion, Out-of-bounds Array Access, Command Length Miscalculation, and Missing Validation | 2 | `CONFIRMED` | `FIXED` | In BRL-CAD libged Batch 22 commands (rm, rmap, rmat, rmater, rot, rotate_about, rot_point, rrt, rt, rtabort): in rm.c, fixed boolean CSG tree subtraction bug in _rm_tree_remove_named_leaf_instance where removing the left child of an OP_SUBTRACT node erroneously promoted the right child to a positive union instead of freeing the right tree and nullifying the subtraction, guarded null and empty operands in _rm_expand_operand while preserving unmatched glob patterns for standard error reporting, guarded argv[i] against null/empty in operand loop, and added missing newline to usage string; in rmap.c, added _ged_rmap_free_list helper and called it on rt_db_get_internal failure to eliminate persistent memory leaks of id_to_names and id_names list nodes, validated intern.idb_type == ID_COMBINATION and intern.idb_ptr before casting, replaced bu_vls_addr with bu_vls_cstr, and added missing newlines to usage and error messages; in rmat.c, added null check on argv[1], reported diagnostic error message when bn_decode_mat fails, and added missing newline to usage; in rmater.c, fixed stack buffer overflow in extract_mater_from_line by bounding string extraction to name and shader buffer capacities, replaced raw sscanf with bu_sscanf, prevented undefined behavior and crash by continuing loop instead of falling through on rt_db_get_internal failure, validated intern.idb_type == ID_COMBINATION before accessing comb, used bu_vls_trunc to safely clear comb->shader, and added missing newlines; in rot.c, added standard GED_CHECK_DATABASE_OPEN, GED_CHECK_VIEW, and GED_CHECK_ARGC_GT_0 guards; in rotate_about.c, guarded against out-of-bounds byte reads and null dereference on argv[1], and added missing newlines to current setting output and usage strings; in rot_point.c, fixed copy-paste typo where ged_m2v_point was reported instead of command name, replaced sscanf with bu_sscanf, guarded coordinate arguments against null, and added missing newlines; in rrt.c, fixed command length miscalculation where gd_rt_cmd_len was set only to the count of who objects rather than the full command length, eliminated persistent memory leak of strings allocated by ged_who_argv by freeing each who object after execution, and guarded argv[i] against null; in rt.c, replaced sprintf with snprintf, provided PATH fallback when bu_dir returns null, guarded argv[i] against null, and explicitly null-terminated gd_rt_cmd; in rtabort.c, added null checks on rrp, rrp->p, and cmd before processing and terminating subprocesses, and added missing newline to usage string. |
|
||||
| `SEC-0265` | `src/libged/rtcheck/rtcheck.c, src/libged/rtcheck/rtcheck2.cpp, src/libged/rtwizard/rtwizard.c, src/libged/savekey/savekey.c, src/libged/scale/scale.c, src/libged/search/search.c, src/libged/select/select.c, src/libged/select/select2.cpp, src/libged/set_output_script/set_output_script.c, src/libged/set_transparency/set_transparency.c` | `rtcheck/rtcheck.c:100-165, 225-285, 320-330; rtcheck/rtcheck2.cpp:80-165, 220-280, 310-320; rtwizard/rtwizard.c:45-75, 110-180, 185-195; savekey/savekey.c:45-55, 75-100; scale/scale.c:40-60; search/search.c:285-295, 395-485, 570-580; select/select.c:45-50, 110-115, 240-245, 375-480, 505-600; select/select2.cpp:120-130, 235-265, 285-320, 445-505; set_output_script/set_output_script.c:45-60; set_transparency/set_transparency.c:30-65, 85-125` | Resource Leaks, Memory Leaks, Null Pointer Dereferences, Out-of-bounds Memory Access, and Missing Validation | 2 | `CONFIRMED` | `FIXED` | In BRL-CAD libged Batch 23 commands (rtcheck, rtcheck2, rtwizard, savekey, scale, search, select, select2, set_output_script, set_transparency): in rtcheck.c, added null checks in rtcheck_vector_handler and rtcheck_output_handler on rtcp, rrtp, gedp, rtcp->fp, and rrtp->p, provided PATH fallback when bu_dir returns null, allocated args + 1 for gd_rt_cmd, guarded argv[i] against null, and eliminated persistent memory leak of strings allocated by ged_who_argv by freeing each string on error and success paths; in rtcheck2.cpp, added null checks in rtcheck_vector_handler and rtcheck_output_handler on rtcp, rrtp, gedp, rtcp->fp, and rrtp->p, provided PATH fallback when bu_dir returns null, allocated args + 1, guarded argv[i] against null, and freed strings allocated by ged_who_argv on error and success paths; in rtwizard.c, added null checks on gedp and gd_rt_cmd in _ged_run_rtwizard, replaced sprintf with snprintf, allocated args + 1 for gd_rt_cmd, guarded argv[i] against null, and freed strings returned by ged_who_argv upon command completion to eliminate memory leaks; in savekey.c, added null checks on gedp, gvp, fp, and eye_model in savekey_rt_oldwrite, validated time argument with bu_sscanf instead of raw atof and reported error on invalid input, replaced raw perror writes to stderr with structured error logging to ged_result_str, checked argv[1], and added missing newlines to usage and error strings; in scale.c, added GED_CHECK_DATABASE_OPEN, GED_CHECK_VIEW, and GED_CHECK_ARGC_GT_0 guards, validated scale factor against non-positive and non-finite values and reported error instead of silently returning OK, and added missing newline to error message; in search.c, corrected pointer size calculation from sizeof(char *) to sizeof(struct directory *) in _ged_search_localized_obj_list, added missing GED_CHECK_DATABASE_OPEN and GED_CHECK_ARGC_GT_0 guards in ged_search_core, guarded argv_orig[i] against null in option scanning loop, checked bu_argv_dup return value, and bounded plan_argv < argc in both plan discovery and plan string construction loops to prevent out-of-bounds pointer reads; in select.c, plugged persistent leak of rt_wdb database handles opened via wdb_dbopen by ensuring wdb_close is called immediately after import or upon error in both ged_select_core and ged_rselect_core, guarded ged_gvp->gv_s before accessing screen rectangle, freed intern on early error paths, replaced raw sscanf with bu_sscanf, added missing newlines to all error and usage messages, and added null checks on botip, botip->vertices, hdlp, and vls; in select2.cpp, added GED_CHECK_DATABASE_OPEN and GED_CHECK_ARGC_GT_0 guards in ged_select2_core, guarded argv[i] in option loop, safely checked argc <= 0 before indexing argv[0] in subcommand dispatch, added null checks in _select_cmd_msgs, and added missing newlines in _select_cmd_add and _select_cmd_rm; in set_output_script.c, added missing newline to usage, and guarded against passing null ged_output_script to %s in bu_vls_printf; in set_transparency.c, added GED_CHECK_DATABASE_OPEN guard, returned GED_HELP on argc == 1, replaced raw sscanf with bu_sscanf, clamped transparency to [0.0, 1.0], returned BRLCAD_ERROR when _ged_build_dpp fails, added null checks on gedp, i, ged_gdp, dpp, hdlp, and sp->s_os in dl_set_transparency, and added missing newlines to usage messages. |
|
||||
| `SEC-0266` | `src/libged/set_uplotOutputMode/set_uplotOutputMode.c, src/libged/setview/setview.c, src/libged/shaded_mode/shaded_mode.c, src/libged/shader/shader.c, src/libged/shells/shells.c, src/libged/showmats/showmats.c, src/libged/shrinkwrap/shrinkwrap.c, src/libged/simulate/ged_command.cpp, src/libged/simulate/rt_collision_algorithm.cpp, src/libged/simulate/rt_collision_algorithm.hpp` | `set_uplotOutputMode/set_uplotOutputMode.c:48-75; setview/setview.c:48-85; shaded_mode/shaded_mode.c:50-80; shader/shader.c:42-75; shells/shells.c:48-135; showmats/showmats.c:50-75, 80-180; shrinkwrap/shrinkwrap.c:30-40; simulate/ged_command.cpp:40-48, 180-192, 285-325; simulate/rt_collision_algorithm.cpp:98-120, 150-205` | Resource Leaks, Memory Leaks, Double-Free, Division by Zero, Mutating Input, and Null Pointer Dereferences | 2 | `CONFIRMED` | `FIXED` | In BRL-CAD libged Batch 24 commands (set_uplotOutputMode, setview, shaded_mode, shader, shells, showmats, shrinkwrap, simulate): in set_uplotOutputMode.c, added null and empty string guards on argv[1] before inspecting characters, and appended missing newlines to usage, binary, and text output strings; in setview.c, added null checks on argv[1] when argc == 2 and argv[1..3] when argc == 4, replaced raw sscanf with bu_sscanf, safely printed bad coordinate values, and added missing newlines to usage strings; in shaded_mode.c, guarded argv[1] against null, replaced raw sscanf with bu_sscanf, and added missing newlines to mode output and usage strings; in shader.c, added null check on argv[1], verified argv[2..argc-1] are non-null before bu_vls_from_argv, replaced bu_vls_addr with bu_vls_cstr, and added missing newlines to usage, current shader output, and read-only error message; in shells.c, fixed major resource and memory leaks by deferring wdb_dbopen until after argument validation, verifying wdbp allocation, calling wdb_close on all error and success exits, calling rt_db_free_internal on old_intern across all exits, freeing shell_name on all exits, and eliminating double-free of m_tmp after rt_db_put_internal failure; in showmats.c, eliminated mutation of input path and improved safety by operating on a duplicated string buffer via bu_strdup and freeing path_copy on all exit paths, guarded smdp, smdp->smd_child, and comb_leaf->tr_l.tl_name against null in Do_showmats, guarded argv[1] against null in ged_showmats_core, added trailing newline to 16-element matrix output in -a mode, and added missing newlines to usage strings; in shrinkwrap.c, added GED_CHECK_DATABASE_OPEN guard and safely handled potential null argv[0]; in simulate/ged_command.cpp, added missing newline to non-Bullet error message, validated argc >= 3 and ensured argv[1] and argv[2] are non-null before parsing options, wrapped anim_state in std::unique_ptr to prevent persistent memory and resource leaks if exceptions are thrown during simulation steps, and added missing newline to exception result output; in simulate/rt_collision_algorithm.cpp, guarded against null rays in free_xrays, prevented division by zero by validating grid_radius > 0 and radius > 0 in generate_ray_grid and get_rays, returning null safely instead of calling bu_bomb, and added null checks on btRigidBody::upcast, getMotionState, and rays.ptr in calculate_contact_points to prevent null pointer dereferences. |
|
||||
| `SEC-0267` | `src/libged/simulate/rt_collision_shape.cpp, src/libged/simulate/rt_collision_shape.hpp, src/libged/simulate/rt_debug_draw.cpp, src/libged/simulate/rt_debug_draw.hpp, src/libged/simulate/rt_instance.cpp, src/libged/simulate/rt_instance.hpp, src/libged/simulate/rt_motion_state.cpp, src/libged/simulate/rt_motion_state.hpp, src/libged/simulate/rt_roi_collision_shape.cpp, src/libged/simulate/rt_roi_collision_shape.hpp` | `simulate/rt_collision_shape.cpp:106-112, 130-149; simulate/rt_debug_draw.cpp:78-95, 116-125, 130-145, 156-175, 172-201; simulate/rt_instance.cpp:60-105, 117-150; simulate/rt_motion_state.cpp:45-50, 62-67, 104-140; simulate/rt_roi_collision_shape.cpp:123-185; simulate/rt_roi_collision_shape.hpp:116-121` | Resource Leaks, Memory Corruption, Unhandled Exceptions/Process Termination (bu_bomb), and Null Pointer Dereferences | 2 | `CONFIRMED` | `FIXED` | In BRL-CAD libged Batch 25 commands (src/libged/simulate/*): in rt_collision_shape.cpp, eliminated process-aborting bu_bomb calls by zeroing inertia when mass <= 0.0 and clamping negative scaling and margin values to 0.0; in rt_debug_draw.cpp, fixed major resource leaks of in-memory database handles by ensuring wdb_close is called on all paths in drawLine, drawAabb, and drawContactPoint, clamped color components to [0.0, 1.0] instead of terminating with bu_bomb, and added null check on message in reportErrorWarning; in rt_instance.cpp, guarded against null application and partition pointers in multioverlap_handler, falling back safely to rt_default_multioverlap on unexpected region table lengths or region names instead of calling bu_bomb, and threw InvalidSimulationError instead of aborting the process with bu_bomb when rt_i_create or rt_gettrees fails in get_overlaps; in rt_motion_state.cpp, guarded matrix and result destination pointers in bt_transform_to_matrix and path_to_matrix, and threw InvalidSimulationError instead of calling bu_bomb on rt_db_get_internal, db_find_named_leaf, or rt_db_put_internal failure; in rt_roi_collision_shape.cpp, guarded against null m_box_shape before dereferencing in getAabb, calculateLocalInertia, getLocalScaling, getMargin, setLocalScaling, and setMargin, clamped negative scaling and margin values, and zeroed inertia when mass <= 0.0; and in rt_roi_collision_shape.hpp, declared copy constructor and assignment operator private to enforce the Rule of Three and prevent double-free corruption of m_box_shape. |
|
||||
| `SEC-0268` | `src/libged/simulate/sim_animate.cpp, src/libged/simulate/sim_animate.hpp, src/libged/simulate/simulation.cpp, src/libged/simulate/simulation.hpp, src/libged/simulate/tests/simulate_test.cpp, src/libged/simulate/tests/verify_simulation.c, src/libged/simulate/utility.cpp, src/libged/slew/slew.c, src/libged/solid_report/solid_report.c` | `simulate/sim_animate.cpp:95-135, 218-228, 300-360, 575-605; simulate/sim_animate.hpp:105-112; simulate/simulation.cpp:135-145, 185-190, 265-275, 350-395, 465-495, 595-635, 825-835; simulate/simulation.hpp:88-95; simulate/tests/simulate_test.cpp:40-48, 336-342; simulate/tests/verify_simulation.c:37-65, 75-80, 168-175, 225-235, 255-260; simulate/utility.cpp:45-90; slew/slew.c:48-98; solid_report/solid_report.c:32-37` | Memory Leaks, Inverted Return Value Logic Bug, Process Termination in Library Function (bu_bomb), Missing Validation, Division by Zero, and Null Pointer Dereferences | 2 | `CONFIRMED` | `FIXED` | In BRL-CAD libged Batch 26 commands (simulate, slew, solid_report): in simulate/sim_animate.cpp and sim_animate.hpp, added null checks in az_el_to_offset, look_at_quaternion, and ae_to_quaternion, guarded m_gedp and dbip in getSceneCenter and renderFrame, cleared jpeg_data on error and bounded maximum buffer read size in readPixToJpeg, validated width, height, and fps in encodeVideo, enforced the Rule of Three on SimAnimState with private copy constructor and assignment operator, and removed unused method declaration writeMjpegAvi; in simulate/simulation.cpp and simulation.hpp, eliminated multiple process-terminating bu_bomb calls across get_aabb, get_simulation_parameters, Region::get_region, and Region::get_regions by throwing InvalidSimulationError with contextual path information, replaced bu_bomb in saveState with warning logging, eliminated persistent memory leak of bullet collision create functions in Simulation::Simulation by tracking allocated CreateFunc pointers in m_create_funcs and deleting them in ~Simulation(), and enforced the Rule of Three on Simulation and Region; in simulate/tests/simulate_test.cpp, safely returned false on null matrix in matrix_equal instead of calling bu_bomb, and guarded argv and argv[0] in main; in simulate/tests/verify_simulation.c, added null checks in parse_bbox, get_bbox, check_presim, check_postsim, and main, replaced raw sscanf with bu_sscanf, replaced bu_vls_addr with bu_vls_cstr, and guarded against division by zero on truck_height when calculating penetration percentage; in simulate/utility.cpp, threw InvalidSimulationError in current_dir on empty paths, fixed critical inverted logic bug in set_region where bu_avs_remove returning 1 on successful attribute removal was erroneously treated as an error causing bu_bomb to abort the process, and replaced remaining bu_bomb calls with warning logging to ensure clean teardown in ~TemporaryRegionHandle; in slew/slew.c, added null checks on argv[1..3], replaced raw sscanf with bu_sscanf, and added missing newlines to all usage strings; and in solid_report/solid_report.c, guarded gedp against null. |
|
||||
| `SEC-0269` | `src/libged/solids_on_ray/solids_on_ray.c, src/libged/sphgroup/sphgroup.c, src/libged/stat/stat.cpp, src/libged/summary/summary.c, src/libged/sync/sync.c, src/libged/tab_complete.cpp, src/libged/tables/tables.c, src/libged/tests/bot/bot_dump.cpp, src/libged/tests/bot/bot_split.cpp, src/libged/tests/check_mann_docs.cpp` | `solids_on_ray/solids_on_ray.c:60-75, 120-130, 240-275; sphgroup/sphgroup.c:50-58, 85-115; stat/stat.cpp:115-125, 200-245, 330-365, 430-470; summary/summary.c:50-80, 150-185, 230-245; sync/sync.c:45-55; tab_complete.cpp:45-75, 110-180; tables/tables.c:165-185, 255-275, 410-440, 520-560; tests/bot/bot_dump.cpp:130-140, 405-415; tests/bot/bot_split.cpp:85-105, 130-145, 185-195, 225-235; tests/check_mann_docs.cpp:105-110, 635-645, 755-765, 820-835, 965-975, 1005-1015` | Memory Leaks, Resource Leaks, Option Parsing Collision, Uninitialized Memory Operations, and Null Pointer Dereferences | 2 | `CONFIRMED` | `FIXED` | In BRL-CAD libged Batch 27 commands and test drivers: in solids_on_ray/solids_on_ray.c, eliminated persistent memory leaks of solids_on_ray_cmd_vec strings (allocated by ged_who_argv) and snames path strings (allocated by db_path_to_string), added null guards on ap and PartHeadp in rpt_hits, verified pp->pt_inseg and pp->pt_inseg->seg_stp before retrieving path, guarded ap in rpt_miss, added null checks on gedp, dbip, ray_orig, and ray_dir in skewer_solids, replaced raw sscanf with bu_sscanf, added null checks on argv[1] and argv[2], and added missing newlines to usage and error strings; in sphgroup/sphgroup.c, fixed persistent memory leak of sph_intern by calling rt_db_free_internal on non-sphere error, _ged_combadd error, and normal exit, added null/empty string validation on argv[1] and argv[2], added missing newline to usage string, and deleted commented-out dead code; in stat/stat.cpp, fixed option parsing bug where the -q quiet flag was clobbered by -r raw due to duplicate array index d[3], fixed memory leaks in cmp_dps by using std::string to eliminate bu_vls leaks and freeing avs and string allocations on all exit paths, fixed memory leaks in stat_output by scoping bu_vls and freeing avs, added null/bounds checks in dpath_sort and _stat_find_first_unescaped, and added missing newlines to bu_log; in summary/summary.c, fixed major memory leak in solid_counter by calling rt_db_free_internal, added null checks in comb_counter and solid_counter, validated bu_opt_parse return value, guarded argv[0] against null, and added error output on missing objects; in sync/sync.c, added GED_CHECK_ARGC_GT_0 to prevent null dereference of argv[0] and appended missing newline; in tab_complete.cpp, added null guards in alphanum_cmp, path_match, obj_match, and ged_cmd_completions; in tables/tables.c, fixed memory leak of tree_objs bu_ptbl, verified read count before matching identt in tables_sol_number, initialized static descriptors to -1, guarded sol_loaded before invoking ft_describe or freeing sol_intern in tables_new, guarded getpwuid against null in tables_header, guarded ctime return in ged_tables_core, and added missing newlines; in tests/bot/bot_dump.cpp, guarded argv against null, corrected arbs_stl output comparison path for arb4_bot_02.stl, and added missing newlines; in tests/bot/bot_split.cpp, guarded argv in main, added null checks in check_output_group, check_output_bot, and check_decimated_bot, and ensured rt_db_free_internal is called on early return; and in tests/check_mann_docs.cpp, validated argv in main, added null checks before array indexing, and verified file stream is_open status before reading or writing. |
|
||||
| `SEC-0270` | `src/libged/tests/check_prim_cmds.cpp, src/libged/tests/create/create_parity.c, src/libged/tests/create/create_parity.h, src/libged/tests/create/in_cases.c, src/libged/tests/create/make_cases.c, src/libged/tests/draw/aet.cpp, src/libged/tests/draw/annotate.cpp, src/libged/tests/draw/basic.cpp, src/libged/tests/draw/draw_color.cpp, src/libged/tests/draw/faceplate.cpp` | `tests/check_prim_cmds.cpp:52-64; tests/create/create_parity.c:60-75, 84-100, 155-165, 205-230; tests/create/in_cases.c:45-55; tests/create/make_cases.c:45-60, 115-125, 140-150; tests/draw/aet.cpp:200-220, 245-285, 335-375, 405-415; tests/draw/annotate.cpp:60-65, 260-275, 390-410; tests/draw/basic.cpp:45-170, 200-235, 770-800; tests/draw/draw_color.cpp:45-55, 105-140, 150-165; tests/draw/faceplate.cpp:50-70, 335-350` | Logic Bugs, Resource and Handle Leaks, Missing Parameter and Option Validation, and Null Pointer Dereferences | 2 | `CONFIRMED` | `FIXED` | In BRL-CAD libged Batch 28 test suites and drivers: in tests/check_prim_cmds.cpp, guarded argc and argv in main and checked empty ftp->ft_label string; in tests/create/create_parity.c, added null checks in case_covered and check_coverage, fixed handle leak in open_test_db by closing wdbp with wdb_close instead of leaking wdbp via raw db_close, guarded gedp, gedp->dbip, name, and out in snapshot, guarded argc and argv in main, and ensured temporary test database files are deleted on all exit paths; in tests/create/create_parity.h, verified interface header clean; in tests/create/in_cases.c and make_cases.c, added null guards on gedp, name, and label in build_obj and make_obj, and added null checks in trans_exempt and extra_checks; in tests/draw/aet.cpp, guarded gedp, dbi_state, view counts, and display manager pointers in dm_refresh and img_cmp, freed tname on error exits, guarded argc and argv in main, validated option parsing results, freed fname, deleted temporary database moss_aet_tmp.g, and cleared local cache directory lcache on exit; in tests/draw/annotate.cpp, fixed handle leak in verify_geometry_update by ensuring wdb_close is called on wdbp, guarded gedp and gedp->dbip in verify_legacy_annotation_coloring, and guarded argc and argv in main; in tests/draw/basic.cpp and faceplate.cpp, fixed critical logic bug where if (uac == -1 || need_help) had an empty statement body which inverted command-line argument validation logic, guarded ac and av in main, guarded gedp across poly_* helper functions, freed fname, deleted temporary moss_tmp.g, and cleared lcache on exit; and in tests/draw/draw_color.cpp, guarded argv in main, guarded fixture path, and added null checks on gedp, gedp internals, display structures, and directory pointers in check_drawing. |
|
||||
| `SEC-0271` | `src/libged/tests/draw/lod.cpp, src/libged/tests/draw/quad.cpp, src/libged/tests/draw/select.cpp, src/libged/tests/draw/util.cpp, src/libged/tests/edit/test_edit.cpp, src/libged/tests/ged_test_rm.c, src/libged/tests/ged_test_tire.cpp, src/libged/tests/plugins.cpp, src/libged/tests/search_tests.cpp, src/libged/tests/test_bb_tight.c` | `tests/draw/lod.cpp:180-260, 420-475; tests/draw/quad.cpp:130-170, 200-240, 275-310, 1100-1160; tests/draw/select.cpp:185-265, 750-805; tests/draw/util.cpp:50-95, 230-295; tests/edit/test_edit.cpp:380-410, 890-915, 3470-3530; tests/ged_test_rm.c:60-95, 410-440, 960-1010; tests/ged_test_tire.cpp:50-100, 260-280, 520-560, 680-715; tests/plugins.cpp:50-65, 380-420, 460-475; tests/search_tests.cpp:40-65, 170-215; tests/test_bb_tight.c:45-75, 120-140, 185-225` | Logic Bugs, Temporary File and Resource Leaks, Double-Free, Missing Option and Parameter Validation, and Null Pointer Dereferences | 2 | `CONFIRMED` | `FIXED` | In BRL-CAD libged Batch 29 test suites and drivers: in tests/draw/lod.cpp and select.cpp, corrected option parsing check from ac != 2 to uac != 2 so optional command flags such as -c are correctly recognized without causing premature test failure, added null guards on ac, av, gedp, gedp->dbip, v, and v->dmp, freed fname and cleaned up temporary test databases on all exit paths; in tests/draw/quad.cpp, added null checks across drawing and refresh helpers, guarded image comparison against null control and test images, freed cname, corrected option parsing bounds, and ensured temporary database cleanup on exit; in tests/draw/util.cpp, added null guards on dp, u_data, dbi_state, ged_gvp, and dmp, and plugged memory leaks in img_cmp; in tests/edit/test_edit.cpp, replaced invalid jump-over-initialization error path with direct cleanup in create_p0_fixture, replaced manual export and double-free in create_p6_fixture with mk_brep, and ensured all 10 temporary database files (p0_path through p6_path) are unlinked via bu_file_delete across all error and success exits; in tests/ged_test_rm.c, replaced leaking db_close calls with wdb_close, added close_test_db to delete temporary test database files upon completion across all 26 test functions, fixed unchecked db_lookup dereferences, and added null guards in CHECK_PRESENT, CHECK_ABSENT, member_count, comb_has_op, and main; in tests/ged_test_tire.cpp, fixed database handle leaks by properly pairing wdb_fopen with wdb_close, added close_test_db to clean up temporary test databases, unlinked temporary text files and pattern files via bu_file_delete, eliminated premature wdb_close in run_partial_cleanup_case on an unowned handle, and added null checks across inspection helpers; in tests/plugins.cpp, fixed off-by-one / null pointer dereference in error message accessing av[1] instead of av[0], guarded ac and av in main, and added null checks on imsgs and cmds; in tests/search_tests.cpp, added null guards for gedp, gedp->dbip, path_dp, and search_count_helper, and validated argc/argv; and in tests/test_bb_tight.c, fixed wdbp handle leaks in open_test_db, added close_test_db to remove temporary test databases, and added null guards in parse_bb_volume, run_bb_volume, and main. |
|
||||
| `SEC-0272` | `src/libged/tests/test_bo.c, src/libged/tests/test_db.c, src/libged/tests/test_gqa.c, src/libged/tests/test_list.c, src/libged/tests/test_material.c, src/libged/tests/test_search.c, src/libged/tests/test_select.cpp, src/libged/tests/test_tops.c, src/libged/tests/test_view_dir.c, src/libged/tire/tire.cpp` | `tests/test_bo.c:79-88, 115; tests/test_gqa.c:65-70; tests/test_list.c:43-45, 63-73; tests/test_material.c:127-132, 148-152; tests/test_search.c:63-71, 104-109; tests/test_select.cpp:54-60, 185-195; tests/test_tops.c:48-53` | Resource Leaks, Null Pointer Dereferences, Division by Zero, and Array Overflow | 2 | `CONFIRMED` | `FIXED` | In BRL-CAD libged Batch 30 test programs and tire command: in test_bo.c, replaced db_close(wdbp->dbip) with wdb_close(wdbp) to fix wdb handle leak, and added null guard on binunif internal pointer before accessing type, count, and data fields; in test_gqa.c, added null check on ged_open return value; in test_list.c, validated atoi result for non-positive values and guarded elapsed_sec > 0 before division to prevent division by zero in ops-per-second calculation; in test_material.c, added null check on ged_open return value and added ged_close before exit to prevent resource leak; in test_search.c, added null check on ged_open return value and added bounds check on variadic plan arguments to prevent overflow of fixed-size cmd[6] array; in test_select.cpp, added null check on ged_open return value, freed DbiState allocation, and cleaned up temporary cache directory with bu_dirclear on exit; in test_tops.c, added null check on ged_open return value; test_db.c reviewed clean (ged_open already checked, bu_vls_cstr never returns NULL); test_view_dir.c reviewed clean (proper goto/done cleanup pattern); tire/tire.cpp reviewed clean (GED_CHECK_DATABASE_OPEN ensures valid state, extensive validation in build_validated_request). |
|
||||
| `SEC-0273` | `src/libged/tire/tire_conic.cpp, src/libged/tire/tire_csg.cpp, src/libged/tire/tire_private.h, src/libged/tire/tire_surface.cpp, src/libged/tire/tire_tread.cpp, src/libged/tire/tire_tread_def.cpp, src/libged/tire/tire_tread_profile.cpp, src/libged/tire/tire_wheel.cpp, src/libged/title/title.c, src/libged/tol/tol.c` | `tire/tire_surface.cpp:88-94; tire/tire_tread.cpp:49-52; title/title.c:57; tol/tol.c:246` | Division by Zero, Integer Underflow, and Convention Violations | 2 | `CONFIRMED` | `FIXED` | In BRL-CAD libged Batch 31 (tire, title, tol): in tire/tire_surface.cpp, added ZERO() division-by-zero guard before dividing by spec.dyside1 and ztire_with_offset in make_tire to prevent floating-point divide-by-zero on degenerate tire specifications; in tire/tire_tread.cpp, added empty vector guard in emit_tread_extrusions to prevent size_t underflow when verts.size()-1 wraps to SIZE_MAX on an empty vector; in title/title.c, replaced bu_vls_addr with bu_vls_cstr per BRL-CAD conventions; in tol/tol.c, replaced raw sscanf with bu_sscanf for locale-independent parsing per BRL-CAD conventions. Reviewed clean: tire_conic.cpp (robust std::optional error handling, no raw allocations), tire_csg.cpp (RAII CsgTransaction pattern with deleted copy ctor, proper rollback), tire_private.h (header-only definitions), tire_tread_def.cpp (thorough JSON validation with try/catch), tire_tread_profile.cpp (all solver calls checked for nullopt), tire_wheel.cpp (all write operations checked). |
|
||||
| `SEC-0274` | `src/libged/tops/tops.c, src/libged/tra/tra.c, src/libged/trace.c, src/libged/track/track.c, src/libged/tree/tree.c, src/libged/typein/typein.c, src/libged/unhide/unhide.c, src/libged/units/units.c, src/libged/v2m_point/v2m_point.c, src/libged/vdraw/vdraw.c` | `tree/tree.c:145-170,205-220; typein/typein.c:1580-1600,2780-2800; units/units.c:82; v2m_point/v2m_point.c:56-68; vdraw/vdraw.c:170-230` | Memory Leaks, Resource Leaks, Unsafe API, and Convention Violations | 2 | `CONFIRMED` | `FIXED` | In BRL-CAD libged Batch 32 (tops through vdraw): in tree/tree.c, fixed memory leak of attribute value set by adding bu_avs_free, fixed resource leak of rt_db_internal on v4gift flatten failure, replaced bu_vls_addr with bu_vls_cstr; in typein/typein.c, fixed resource leaks in extrude_in and revolve_in when imported object is not ID_SKETCH by adding rt_db_free_internal, replaced bu_vls_addr with bu_vls_cstr in revolve_in and pnts_in (4 instances); in units/units.c, replaced bu_vls_addr with bu_vls_cstr; in v2m_point/v2m_point.c, replaced raw sscanf with bu_sscanf (3 instances), fixed copy-paste error in error messages; in vdraw/vdraw.c, replaced raw sscanf with bu_sscanf (7 instances). Reviewed clean: tops.c (proper GED_CHECK guards), tra.c (validated argument handling), trace.c (correct tree traversal), track.c (GED_CHECK guards, proper cleanup), unhide.c (minimal unhide command). |
|
||||
| `SEC-0275` | `src/libged/vers.c, src/libged/view/aet.c, src/libged/view/align.c, src/libged/view/autoview.c, src/libged/view/autoview2.cpp, src/libged/view/axes.c, src/libged/view/center.cpp, src/libged/view/data_lines.c, src/libged/view/eye.c, src/libged/view/faceplate/faceplate.c, src/libged/view/faceplate/faceplate.h, src/libged/view/faceplate/faceplate_axes.c, src/libged/view/faceplate/faceplate_grid.c, src/libged/view/faceplate/interactive_rect.c, src/libged/view/ged_view.h` | `view/aet.c:86-97; view/align.c:80-90; view/center.cpp:156-166; view/eye.c:76-86; view/faceplate/faceplate.c:121,226,320,380` | Unsafe API and Memory Leaks | 2 | `CONFIRMED` | `FIXED` | In BRL-CAD libged Batch 33 (view module): in view/aet.c, replaced raw sscanf with bu_sscanf (3 sites); in view/align.c, replaced raw sscanf with bu_sscanf (3 sites); in view/center.cpp, replaced raw sscanf with bu_sscanf (3 sites); in view/eye.c, replaced raw sscanf with bu_sscanf (3 sites); in view/faceplate/faceplate.c, added bu_vls_free on stack VLS after bu_opt_color and bu_opt_int calls to prevent memory leaks (4 sites). Reviewed clean: vers.c (trivial version function), autoview.c (proper bu_calloc/bu_free), autoview2.cpp (bu_opt_parse with cleanup), axes.c (bu_opt_fastf_t/bu_opt_int/bu_opt_color with proper cleanup), data_lines.c (already uses bu_sscanf), faceplate.h (declarations only), faceplate_axes.c (design-level struct mismatch, not a simple fix), faceplate_grid.c (similar struct mismatch), interactive_rect.c (similar struct mismatch), ged_view.h (declarations only). |
|
||||
| `SEC-0276` | `src/libged/view/gobjs.cpp, src/libged/view/knob.c, src/libged/view/labels.c, src/libged/view/lines.c, src/libged/view/lod.cpp, src/libged/view/lookat.c, src/libged/view/objs.cpp, src/libged/view/polygons.c, src/libged/view/quat.c, src/libged/view/qvrot.c, src/libged/view/saveview.c, src/libged/view/size.c, src/libged/view/snap.c, src/libged/view/view.c, src/libged/view/viewdir.c, src/libged/view/ypr.c` | `view/gobjs.cpp:48-57,113-130,150-164; view/labels.c:127-148; view/lines.c:84-90; view/lod.cpp:178-190,340-345; view/lookat.c:70-100; view/objs.cpp:168-183,219-244,561-625; view/polygons.c:106,487,531,847-855; view/quat.c:62-65; view/qvrot.c:89-105; view/saveview.c:97,127,173-176; view/size.c:61-65; view/snap.c:100-135,153,194; view/view.c:831,840,850,874,948; view/viewdir.c:58; view/ypr.c:73-81` | Memory Leaks, Logic Bugs, Out-of-bounds Array Access, Resource Leaks, Unsafe API, and Missing Validation | 2 | `CONFIRMED` | `FIXED` | In BRL-CAD libged Batch 34 (view module: gobjs through ypr): in view/gobjs.cpp, fixed memory leaks of full path and internal objects in create command and scene free callback, and checked database open; in view/labels.c and view/lines.c, guarded against null scene object creation and used bu_vls_sprintf to prevent vls buffer leaks; in view/lod.cpp, validated database open before cache commands, checked wdb handle, fixed copy-paste error in scale message, and removed dead vls variables; in view/lookat.c, replaced raw sscanf with bu_sscanf (3 sites), guarded against zero vector division when lookat point is at eye position, and added missing newlines; in view/objs.cpp, fixed memory leak of directory pointers in _view_cmd_old_obj across all return paths, guarded against null ged internals, removed redundant recurse check, and fixed argument reporting in arrow subcommand; in view/polygons.c, fixed out-of-bounds argv index in overlap subcommand (argv[1] -> argv[0]), fixed error message reporting in bool subcommand (argv[0] -> argv[1]), checked database open before overlap tolerance check, and formatted s_name with bu_vls_sprintf; in view/quat.c, replaced raw sscanf with bu_sscanf (4 sites) and added missing newlines; in view/qvrot.c, replaced raw sscanf with bu_sscanf (4 sites), corrected argument reporting for bad angle from argv[1] to argv[4], and added missing newlines; in view/saveview.c, replaced bu_vls_addr with bu_vls_cstr, guarded display list traversal against null pointers, and added missing newlines; in view/size.c, replaced raw sscanf with bu_sscanf and added missing newlines; in view/snap.c, fixed critical logic bug where vp was set from uninitialized p instead of parsed 2D coordinates p2d, freed temporary msg vls on all early returns to eliminate memory leak, and added missing newlines; in view/view.c, added missing newlines to usage and error messages; in view/viewdir.c, added missing newline to usage message; in view/ypr.c, replaced raw sscanf with bu_sscanf (3 sites) and added missing newlines. Reviewed clean: knob.c. |
|
||||
| `SEC-0277` | `src/libged/view2grid_lu/view2grid_lu.c, src/libged/view2model/view2model.c, src/libged/view2model_lu/view2model_lu.c, src/libged/view2model_vec/view2model_vec.c, src/libged/voxelize/voxelize.c, src/libged/vrot/vrot.c, src/libged/vutil.c, src/libged/wcodes/wcodes.c, src/libged/wdb_importFg4Section.c, src/libged/whatid/whatid.c, src/libged/which/which.cpp, src/libged/which_shader/which_shader.c, src/libged/who/who.c, src/libged/who/who2.cpp, src/libged/who/who_solids.cpp, src/libged/wireframe_eval.c, src/libged/wmater/wmater.c, src/libged/xpush/xpush.c, src/libged/zap/zap.c, src/libged/zap/zap2.cpp, src/libged/zoom/zoom.c` | `view2grid_lu.c:50-70; view2model.c:70; view2model_lu.c:50-75; view2model_vec.c:50-65; voxelize.c:59,102-225; vrot.c:85-115; vutil.c:40-90,175-185; wcodes.c:70-100; wdb_importFg4Section.c:40-300; whatid.c:40-85; which.cpp:115-180; which_shader.c:60-95; who.c:40-75; who2.cpp:40-75; who_solids.cpp:40-80; wireframe_eval.c:275,1485-1575,1805-1875; wmater.c:40-90; xpush.c:135-200,255-395,440-570; zap.c:40-125; zap2.cpp:50-155; zoom.c:25-65` | Memory Leaks, Resource Leaks, Memory Corruption, Unsafe API, Double Free, Division by Zero, and Missing Validation | 2 | `CONFIRMED` | `FIXED` | In BRL-CAD libged Batch 35 (completing src/libged subsystem, 21 files): in view2grid_lu.c and view2model_lu.c, moved GED_CHECK_DATABASE_OPEN before b2lval evaluation, replaced raw sscanf with bu_sscanf, guarded against division by zero with ZERO macro in view2model_lu.c, and added missing newlines; in view2model.c, added missing newline to usage; in view2model_vec.c, replaced sscanf with bu_sscanf, checked bn_mat_inverse return, and added newline; in voxelize.c, fixed persistent rt_wdb resource leak with wdb_close, fixed rt_i_destroy leak on error, fixed argument reporting in error message, replaced sscanf with bu_sscanf, added bounds checks on voxel size and level of detail, and fixed format string; in vrot.c, added missing newlines and returned GED_HELP on argc == 1; in vutil.c, fixed memory corruption in ged_dl_hash by passing dp->d_namep string content instead of pointer address, added null guards, and checked bn_mat_inverse return values; in wcodes.c, fixed memory leak of path array on error exits, replaced direct ft_ifree with rt_db_free_internal, guarded null names, and added newlines; in wdb_importFg4Section.c, fixed crash on command reuse by resetting static state variables at start of command, replaced free with bu_free, replaced bu_bomb with error logging, validated line buffer lengths, and added zero face count guard; in whatid.c, verified ID_COMBINATION and added newlines; in which.cpp, replaced sscanf with bu_sscanf, guarded against integer subtraction overflow, capped range to prevent memory exhaustion, freed comb_objs on error, and verified ID_COMBINATION; in which_shader.c, fixed major memory leak of combination records by calling rt_db_free_internal on every iteration, replaced bu_vls_addr with bu_vls_cstr, and added newlines; in who.c, moved GED_CHECK_ARGC_GT_0 to top, replaced bu_vls_addr with bu_vls_cstr, guarded gdlp->dl_dp, and added newlines; in who2.cpp, moved GED_CHECK_ARGC_GT_0 to top, guarded dbis and bvs against null, and added newlines; in who_solids.cpp, checked sp->s_os before accessing s_dmode, moved GED_CHECK_ARGC_GT_0 to top, and guarded gedp internals; in wireframe_eval.c, guarded scene and scene data against null, set op for OP_NOP, fixed memory leak of application struct and ppath in draw_m3, and added null checks in fix_halfs and free_etree; in wmater.c, moved GED_CHECK_ARGC_GT_0 to top, replaced bu_vls_addr with bu_vls_cstr, verified ID_COMBINATION, and added newlines; in xpush.c, eliminated persistent rt_wdb handle leaks in Copy_solid and Copy_comb by using stack tolerance structs, fixed double-free on rt_db_put_internal failure, fixed combination internal memory leak when found is null or comb tree is null, guarded log10 domain, and fixed typo; in zap.c, guarded gedp internals, checked path length before accessing first solid, moved GED_CHECK_ARGC_GT_0 to top, and added newline; in zap2.cpp, freed cvls on help and error returns, guarded views, v, bvs, and v->gv_s against null, and moved GED_CHECK_ARGC_GT_0 to top; in zoom.c, replaced sscanf with bu_sscanf, guarded gedp->ged_gvp and division by zero, moved GED_CHECK_ARGC_GT_0 to top, and added newlines. |
|
||||
| `SEC-0279` | `src/libwdb/mater.c, src/libwdb/material.c, src/libwdb/nmg.c, src/libwdb/nurb.c, src/libwdb/pipe.c, src/libwdb/pnts.c, src/libwdb/reg.c, src/libwdb/script.c, src/libwdb/sketch.c, src/libwdb/submodel.c, src/libwdb/units.c, src/libwdb/vol.c, src/libwdb/wdb.c` | `mater.c:40-60; material.c:45-80; nmg.c:45-75; nurb.c:45-65; pipe.c:40-120; pnts.c:50-130,230-260; reg.c:50-80,180-210,310-450; script.c:40-55; sketch.c:40-55; submodel.c:40-55; units.c:40-65; vol.c:40-75; wdb.c:55-885` | Double-Free / Memory Corruption, Memory Leaks, Process Abort, Integer Overflow, and Missing Validation | 2 | `CONFIRMED` | `FIXED` | In BRL-CAD libwdb Batch 37 (procedural primitives, mater through wdb, 13 files, completing src/libwdb): in mater.c, added null checks on ofp and ofp->dbip, and returned -1 on unsupported v4 database rather than asserting mk_version == 4; in material.c, added null checks on wdbp and db_name, guarded against null name, parent, and source strings before bu_vls_strcpy, and validated attribute keys and values before bu_avs_merge to prevent bu_bomb aborts; in nmg.c, added null checks on filep, name, and m before NMG_CK_MODEL, and verified botp != NULL after nmg_bot conversion before export; in nurb.c, added null checks on wdbp, name, and surfs, and verified ni->nsrf > 0 (freeing ni on zero surfaces) before export; in pipe.c, added null checks on fp, name, vertex, and height, verified positive radii with ZERO macro, validated headp in mk_pipe, mk_pipe_free, and mk_pipe_init, and validated od > 0, id >= 0, id < od, and bendradius >= 0 in mk_add_pipe_pnt; in pnts.c, added null checks on pnts and pnts->point in pnts_init_head_pnt and pnts_add, checked scale >= 0.0, and validated point != NULL before adding points in mk_pnts; in reg.c, added null checks on comb and member_hd in mk_tree_pure and mk_tree_gift, guarded headp in mk_freemembers, added null checks on wdbp, combname, and headp in mk_comb, and validated membname in mk_comb1 and mk_region1; in script.c, eliminated Cat 1 memory corruption and caller memory free by allocating and duplicating scr into a newly allocated rt_script_internal before passing to wdb_export; in sketch.c, added null checks on fp, name, and skt, and checked rt_copy_sketch return before export; in submodel.c, added null checks on fp, name, and treetop; in units.c, added null check on str and ZERO() macro guards against zero conversion factor in mk_conversion and mk_set_conversion; in vol.c, added null checks on fp, name, file, cellsize, and mat, and verified positive dimensions and cell sizes; in wdb.c, eliminated memory leaks in mk_hyp by validating parameters before internal structure allocation, replaced bu_bomb in mk_metaball with internal structure cleanup and error return, guarded against integer overflow in mk_binunif allocation and validated data pointer before memcpy, and added null pointer and geometric parameter validation with ZERO macro across mk_half, mk_grip, mk_rpp, mk_wedge, mk_arb4-8, mk_sph, mk_ell, mk_tor, mk_rcc, mk_tgc, mk_cone, mk_trc_h, mk_trc_top, mk_rpc, mk_rhc, mk_epa, mk_ehy, mk_hrt, and mk_eto. |
|
||||
| `SEC-0280` | `src/mged/adc.c, src/mged/arbs.c, src/mged/attach.c, src/mged/axes.c, src/mged/buttons.c, src/mged/cad_boundp.c, src/mged/cad_parea.c, src/mged/chgmodel.c, src/mged/chgtree.c` | `adc.c:75-105,290-310,430,455-505,585-695; arbs.c:35-50,70,85-135,155-205,225-290; attach.c:175-180,265-285,315-325,425-480,565-585,620-640,755-765; axes.c:110-145,155-180,185-205; buttons.c:180-215,275,405-460,795-870,955-1045; cad_boundp.c:45-50,180,290,445,720-755; cad_parea.c:110-135,155-170; chgmodel.c:75-100,205,245-290,325,395,435-445,475; chgtree.c:70,105,150,175,190,245,275-310` | Buffer Overflow, Double-Free, Logic / Angle Calculation Bug, Memory Leaks, Array Out-of-Bounds, Division by Zero, and Missing Validation | 2 | `CONFIRMED` | `FIXED` | In BRL-CAD mged Batch 38 (adc through chgtree, 9 files): in adc.c, fixed stack buffer overflow by capping user_pt coordinate parsing to the 3-element buffer capacity, replaced atof with bu_sscanf, guarded against division by zero in grid_scale across dst, dh, dv, and hv with ZERO macro, fixed incorrect input point parameter in MAT4X3PNT (passing pos_view instead of pos_model), added null pointer guards in adc_set_dirty_flag, adc_set_scroll, adcursor, and f_adc, and replaced bu_vls_addr with bu_vls_cstr; in arbs.c, eliminated double-free on rt_db_put_internal failure and fixed memory leak of internal struct on db_diradd failure and switch default, freed temporary vls on error return, eliminated unused file-scope dead array p_arb3pt and global mutable promp pointer, replaced atof with bu_sscanf, and replaced bu_vls_addr with bu_vls_cstr; in attach.c, made release() name parameter const char *, added null check on s and wp_name in mged_attach, removed redundant null check, and replaced bu_vls_addr with bu_vls_cstr; in axes.c, guarded against aspect division by zero with ZERO macro in draw_v_axes, and added null pointer guards in draw_e_axes, draw_m_axes, and draw_v_axes; in buttons.c, added bounds-checked get_state_str() helper to prevent out-of-bounds array reads on state_str, added null pointer checks in f_press, bv_vrestore, bv_vsave, and bv_adcursor, and replaced bu_vls_addr with bu_vls_cstr; in cad_boundp.c, resolved angle calculation bug where atan2 radian output was multiplied by DEG2RAD instead of RAD2DEG (corrupting bounding polygon angle computations), moved stray debug newline output inside #ifdef DEBUG, migrated memory management to bu_malloc and bu_free, included bu/malloc.h, replaced sscanf with bu_sscanf, and added negative tolerance validation; in cad_parea.c, replaced sscanf with bu_sscanf, and routed error logging from printf to stderr to prevent corrupting redirected stdout files; in chgmodel.c, guarded divisions in f_sc_obj against zero scale denominator and scale accumulators with ZERO macro, validated scale input with bu_sscanf, verified direction vector magnitude squared in f_qorot and corrected inverted error message, replaced sprintf with snprintf and guarded view_state in f_make, and replaced bu_vls_addr with bu_vls_cstr; in chgtree.c, fixed memory leak of internal database struct on db_diradd failure in f_copy_inv, added null guards in find_solid_with_path and find_solid_below_path, ensured lhs, rhs, and both paths are properly freed on all error exit paths in cmd_oed, and replaced bu_vls_addr with bu_vls_cstr. |
|
||||
| `SEC-0281` | `src/mged/chgview.c, src/mged/clone.c` | `chgview.c:269-283, 303-317, 336-368, 385, 410-440, 520-560, 680-730, 750-785, 1015-1035, 1845-1855, 1900-1920, 1935-1965, 1968-2010, 2020-2050, 2060-2090, 2100-2140, 2220-2530, 2540-2770, 2795-2865, 2920-2950, 2960-3040; clone.c:165-175, 230-245, 340-360, 420-445, 520-545, 560-615, 640-675, 740-840, 870-900, 1020-1090, 1160-1280` | Stack Buffer Overflow, Out-of-bounds Array Access, Double-Free, Division by Zero, Memory Leaks, and Null Pointer Dereferences | 2 | `CONFIRMED` | `FIXED` | In BRL-CAD mged Batch 39 (chgview.c and clone.c, 4,128 lines): in clone.c, fixed stack buffer overflows in get_name by adding field width limits with CPP_XSTR(CLONE_BUFSIZE) to bu_sscanf and replacing raw sscanf with bu_sscanf, fixed double-free and memory leaks of name vls by migrating deallocation from bu_vls_free to bu_vls_vlsfree (since get_name allocates outer struct via bu_vls_vlsinit), fixed out-of-bounds negative array indexing obj_list.names[-1] in copy_v5_comb_tree and copy_v4_comb by validating index_in_list return value (lidx >= 0) before indexing, fixed memory leak of obj_list.names[i].src in copy_object and ensured obj_list is freed across all return paths, fixed memory leaks of internal structures and records in copy_v4_solid, copy_v4_comb, copy_v5_solid, and copy_v5_comb on error paths, fixed potential division by zero in f_tracker by checking n_verts > 1, replaced raw calloc/free with bu_calloc/bu_free, and replaced read-only bu_vls_addr calls with bu_vls_cstr; in chgview.c, guarded against division by zero in cmd_size, mged_vscale, and cmd_sca by checking gv_i_scale with ZERO macro, added null checks on view_state and vs_gvp across cmd_center, cmd_size, size_reset, edit_com, cmd_autoview, f_status, f_refresh, update_all_rate_flags, mged_print_knobvals, knob_apply_misc, f_knob, mged_zoom, cmd_setview, f_slewview, mged_svbase, f_svbase, setview, slewview, f_view_ring, cmd_mrot, cmd_rot, cmd_arot, mged_vscale, and cmd_sca, fixed out-of-bounds argv access in edit_com, bounded state_str array indexing in f_status, replaced sprintf with snprintf in f_regdebug and guarded DMP, fixed early-out memory leak of orig_nargv and vlsargv in f_ill, guarded path_parse against null path, guarded MEDIT(s) and s->s_edit before dereference in mged_librt_knob_edit_apply and mged_escale, and replaced read-only bu_vls_addr calls with bu_vls_cstr. |
|
||||
|
||||
| `SEC-0282` | `src/mged/cmd.cpp, src/mged/cmd.h` | `cmd.cpp:245-285, 295-310, 410-440, 480-530, 890-950, 1170-1190, 1220-1285, 1300-1395, 1410-1460, 1480-1545, 1550-1570, 1580-1600, 1620-1645, 1675-1690, 1705-1745, 1775-1925, 1990-2090, 2145-2220, 2275-2285, 2315-2440, 2450-2495, 2500-2540, 2580-2595, 2635-2680, 2730-2745, 2770-2785, 2835-2855, 2875-2930, 3005-3020, 3050-3060, 3075-3095, 3300-3325, 3410-3540` | Memory Leaks, Resource Leak, Out-of-bounds Argument Access, Division by Zero, Duplicate Print Bug, and Null Pointer Dereferences | 2 | `CONFIRMED` | `FIXED` | In BRL-CAD mged Batch 40 (cmd.cpp and cmd.h, 3,647 lines): in cmd.h, audited header prototypes and linkage guards (clean); in cmd.cpp, eliminated memory leak in cmd_ged_inside where rt_db_internal intern was transformed but never freed with rt_db_free_internal across all exits, fixed NULL pointer dereference in cmd_ged_inside on illump->s_old.s_Eflag when illump is NULL, eliminated resource leak in cmd_rt_gettrees where rtip was created with rt_i_create but not destroyed with rt_i_destroy on missing geometry argument exit paths, eliminated duplicate window listing print bug in f_tie when called with no arguments, guarded division by zero in cmd_units with ZERO macro on sf, checked argc and argv bounds before indexing in cmd_ged_edit_wrapper, cmd_ged_simulate_wrapper, cmd_ged_in, cmd_ged_more_wrapper, cmd_nmg_collapse, and cmd_get_more_default, added missing error report when window name is not found in cmd_win set, added null pointer checks on view_state, view_state->vs_gvp, s->mged_curr_dm, DMP, illump, and MEDIT(s) across GED wrapper dispatchers, view management, and rendering hooks (cmd_ged_view_wrapper, cmd_ged_dm_wrapper, cmd_screengrab, cmd_blast, f_postscript, f_winset, _view_update_rate_flags_viewonly, and cmd_view), replaced fixed-size snprintf format in f_bomb with sizeof(buffer), and replaced ~45 read-only bu_vls_addr calls with bu_vls_cstr. |
|
||||
| `SEC-0283` | `src/mged/color_scheme.c, src/mged/columns.c, src/mged/dm-generic.c, src/mged/dodraw.c` | `color_scheme.c:60-75,100-110,135-155,200-245; columns.c:42-78,85-93; dm-generic.c:51-110,140-250,260-395,438-595,602-643,658-688; dodraw.c:58-85,95-165,177-210,223-272,280-286,290-298` | Memory Leak, Null Pointer Dereference, Out-of-bounds Array / Argument Access, and Missing Parameter Validation | 2 | `CONFIRMED` | `FIXED` | In BRL-CAD mged Batch 41 (color_scheme.c, columns.c, dm-generic.c, and dodraw.c, 1,449 lines): in color_scheme.c, added null pointer checks on m_dmp, m_dmp->dm_dmp, s->interp, and color_scheme before dereferencing, ensured error messages are safely reported, and replaced read-only bu_vls_addr calls with bu_vls_cstr; in columns.c, added null pointer guards in vls_col_item and vls_col_eol to prevent crashes on null strings or null buffer pointers, and added symmetric null pointer checks for a, b, *dp1, *dp2, (*dp1)->d_namep, and (*dp2)->d_namep in cmpdirname comparator to prevent qsort crashes; in dm-generic.c, added null checks on s, s->interp, argc, and argv in common_dm and dm_commands, added null guards on rubber_band, mged_variables, s->mged_curr_dm, DMP, view_state, view_state->vs_gvp, s->gedp->ged_gvp->gv_s, adc_state, grid_state, and MEDIT(s) across idle, m, am, adc, con, size, getx, and bg command handlers, checked argc bounds before indexing argv[1..4], replaced raw sscanf with bu_sscanf for RGB background parsing, added null guards in view_state_flag_hook, dirty_hook, zclip_hook, and set_hook_data, and replaced all read-only bu_vls_addr calls with bu_vls_cstr; in dodraw.c, eliminated memory leak in replot_modified_solid where rt_db_internal intern was transformed via transform_editing_solid but never freed when ft_plot failed (< 0), fixed potential NULL pointer dereference and out-of-bounds access in replot_original_solid by validating bdata->s_fullpath.fp_len > 0 and LAST_SOLID(bdata) before dereferencing dp->d_namep, freed existing bdata->s_fullpath with db_free_full_path before duplicating in drawH_part2, guarded s->gedp and ged_dl(s->gedp) against NULL, added null guards in mged_bound_solid, replot_original_solid, replot_modified_solid, add_solid_path_to_result, and redraw_visible_objects, and replaced read-only bu_vls_addr calls with bu_vls_cstr. |
|
||||
| `SEC-0284` | `src/mged/doevent.c, src/mged/dozoom.c` | `doevent.c:65-75,88-120,186-215,253-277,289-360,414-448,460-630,689-715; dozoom.c:54-66,77-93,133-165,165-179,190-210,240-256,270-305,320-335,355-385` | Division by Zero, Null Pointer Dereference, and Out-of-bounds Argument Access | 2 | `CONFIRMED` | `FIXED` | In BRL-CAD mged Batch 42 (doevent.c and dozoom.c, 1,064 lines): in doevent.c, guarded against division by zero in motion_event_handler by clamping window width and height to positive values (width <= 0 ? 1 : width, height <= 0 ? 1 : height) and checking dm_get_aspect with ZERO macro before dividing, added null checks on s, eventPtr, s->mged_curr_dm, and DMP in mged_dm_motion and doEvent, added null guards on rubber_band, grid_state, MEDIT(s), adc_state, view_state, and view_state->vs_gvp across all AMM modes (AMM_IDLE, AMM_ROT, AMM_TRAN, AMM_SCALE, AMM_ADC_*, AMM_CON_*), guarded MEDIT in reset_edflag, and replaced read-only bu_vls_addr calls with bu_vls_cstr; in dozoom.c, eliminated critical division by zero in dozoom perspective calculation where to_eye_scr divided by tan(perspective) without verifying tan != 0 by checking tan value with ZERO macro and using fallback large distance, guarded against division by zero when adjusting inv_viewsize by checking MEDIT(s)->model_changes[15] with ZERO macro, added null checks on s, s->mged_curr_dm, DMP, view_state, view_state->vs_gvp, s->gedp, MEDIT(s), mged_variables, and color_scheme in dozoom, guarded transparency access (sp->s_os->transparency) against null sp->s_os in create_dlist_solid, added null pointer guards in createDLists, create_dlist_solid, createDListSolid, create_dlist_all, createDListAll, free_dlists, and freeDListsAll, and validated active_dm_set display managers and variables. |
|
||||
| `SEC-0285` | `src/mged/edsol.c, src/mged/f_cmd.h` | `edsol.c:85-115, 140-190, 245-295, 305-345, 360-395, 410-445, 460-520, 535-545, 560-575, 590-620, 680-745, 765-815, 875-925, 940-970, 990-1010, 1025-1045, 1070-1115, 1145-1215, 1250-1310, 1335-1390, 1420-1490, 1510-1545, 1555-1575, 1585-1615, 1625-1675, 1685-1710, 1720-1800, 1810-1880, 1890-1960, 1970-1990, 2000-2030, 2040-2070, 2080-2160, 2170-2220, 2230-2245, 2265-2305; f_cmd.h:40-155` | Inverted Logic Bug, Double-Free, Memory Corruption / Type Mismatch, Resource Leaks, Division by Zero, and Null Pointer Dereferences | 2 | `CONFIRMED` | `FIXED` | In BRL-CAD mged Batch 43 (edsol.c and f_cmd.h, 2,324 lines): in f_cmd.h, audited extern command function prototypes (clean); in edsol.c, fixed critical inverted logic bug in ecmd_bot_thick_clbk where face_state > -1 mistakenly triggered error branch and face_state < 0 updated face 0, eliminated double-free in sedit_apply where rt_db_put_internal already frees es_int on all outcomes, fixed reset sequencing in f_sedit_reset where rt_db_free_internal was called before ft_prim_edit_reset zeroing primitive type ID, fixed inverted condition in f_get_sedit (illump || !illump->s_u_data) that caused command to always fail, prevented memory corruption in f_put_sedit by returning TCL_ERROR on functab mismatch rather than executing bu_structparse_argv with wrong structure layout, guarded against division by zero in mged_param with ZERO macro on viewscale, clamped input parameter count to RT_EDIT_MAXPARA, eliminated memory leaks of vls commands on early returns in get_sketch_name, ecmd_extrude_skt_name_clbk, and f_get_sedit_menus, replaced raw atof/atoi with bu_sscanf, verified bn_mat_inverse return in oedit_apply and f_oedit_apply, added primitive type bounds validation (ID_NULL < id <= ID_MAX_SOLID), and added extensive NULL guards on s, MEDIT(s), view_state, DMP, and bdata across all solid and object editing routines. |
|
||||
| `SEC-0286` | `src/mged/f_db.c, src/mged/facedef.c` | `f_db.c:45-150, 155-165, 170-290, 295-305, 310-340, 345-355, 375-465, 475-515; facedef.c:75-135, 140-195, 210-305, 315-330, 340-350, 365-385, 395-425, 435-445` | Out-of-bounds Array / Buffer Access, Uninitialized Variables, Division by Zero, Resource Leaks, and Null Pointer Dereferences | 2 | `CONFIRMED` | `FIXED` | In BRL-CAD mged Batch 44 (f_db.c and facedef.c, 984 lines): in f_db.c, guarded against NULL pointer dereferences on s, gedp, ctx, argv, interpreter, and dbip across _post_opendb_failed, callbacks, f_opendb, and f_closedb, eliminated uninitialized buffer reads when bu_fgets returns EOF, checked Tcl result string validity before indexing, guarded curr_cmd_list before setting more_default, verified argc >= 2 before stripping trailing y/n database creation flags, and replaced all bu_vls_addr calls with bu_vls_cstr; in facedef.c, initialized plane equation index to -1 and added explicit range validation (plane >= 0 && plane < 6) to prevent out-of-bounds array writes, added upper and lower bounds checks on argc-derived array indexing into p_pleqn, p_3pts, p_rotfb, and p_nupnt arrays to prevent out-of-bounds reads, guarded against division by zero in get_pleqn using ZERO macro on vector magnitude before unitizing, replaced raw atof and atoi with bu_sscanf with return validation, added NULL pointer checks on arbo, s, MEDIT(s), and interp, freed error_msg VLS on all exit paths, and replaced bu_vls_addr calls with bu_vls_cstr. |
|
||||
| `SEC-0287` | `src/mged/fbserv.c, src/mged/grid.c` | `fbserv.c:59-64, 100-119, 137-208, 214-239, 246-273, 277-305, 325-330, 334-426, 432-441, 451-460, 469-502, 513-553, 557-631, 644-665, 669-709, 713-739, 743-786, 790-820, 824-864, 871-900, 904-924, 928-944, 948-976, 983-1002, 1009-1028, 1035-1053, 1058-1081, 1085-1102, 1106-1125, 1135-1163, 1167-1183, 1187-1193, 1201-1220; grid.c:69-85, 88-117, 120-140, 144-234, 238-291, 295-329, 333-353, 361-399, 403-426, 430-451, 455-477` | Buffer Over-read, Mismatched Framebuffer Routine, Division by Zero, Infinite Loop / UI Hang, and Null Pointer Dereferences | 2 | `CONFIRMED` | `FIXED` | In BRL-CAD mged Batch 45 (fbserv.c and grid.c, 1,754 lines): in fbserv.c, fixed critical bug in fb_server_fb_bwwriterect where fb_writerect (RGB, 3 bytes/pixel) was called instead of fb_bwwriterect (monochrome, 1 byte/pixel) causing out-of-bounds heap over-reads and image corruption; added packet length and payload dimension validation across all framebuffer network handlers (fb_clear, fb_read, fb_write, fb_readrect, fb_writerect, fb_bwreadrect, fb_bwwriterect, fb_cursor, fb_setcursor, fb_scursor, fb_window, fb_zoom, fb_view, fb_wmap, fb_help) preventing buffer over-reads on truncated or malformed network packets; clamped absurd pixel requests (up to 8192x8192); handled malloc failures with 0-length error packets to prevent client hangs; replaced bu_strlcpy with bounded memcpy for binary auth token packets; added NULL pointer checks on pcp, s, s->mged_curr_dm, DMP, and fbp across all routines; in grid.c, guarded divisions against zero in draw_grid, snap_to_grid, and round_to_grid using ZERO macro on scale and aspect ratio; guarded against integer division by zero and infinite loops when res_major_h or res_major_v <= 0; clamped maximum grid dots (nv_dots, nh_dots <= 2000) to prevent denial-of-service UI hangs; added NULL pointer checks on s, s->mged_curr_dm, s->dbip, grid_state, view_state, view_state->vs_gvp, color_scheme, and s->interp across all callbacks and snap routines; and replaced all read-only bu_vls_addr calls with bu_vls_cstr. |
|
||||
| `SEC-0288` | `src/mged/history.c, src/mged/mater.c, src/mged/menu.c, src/mged/menu.h` | `history.c:53-83, 86-101, 109-156, 171-253, 257-274, 278-285, 288-311, 314-389, 392-401, 404-421; mater.c:49-56; menu.c:98-106, 112-137, 139-162, 164-234, 240-247, 252-257, 262-293, 298-335, 339-358, 362-398, 411-482, 496-538; menu.h:70-73` | Memory Leak, Out-of-bounds Array / Buffer Access, Dead / Unused Code, and Null Pointer Dereferences | 2 | `CONFIRMED` | `FIXED` | In BRL-CAD mged Batch 46 (history.c, mater.c, menu.c, and menu.h, 1,086 lines): in history.c, eliminated guaranteed memory leak in f_history by freeing dynamic VLS str across all normal and error exit paths; guarded against out-of-bounds buffer reads in f_journal by replacing single-byte string indexing with BU_STR_EQUAL(argv[1], "-d"); safely handled empty command string lengths in cmd_hist; added NULL pointer checks on cmdp, curr_cmd_list, curr_cmd_list->cl_cur_hist, journalfp, hptr, argv, and interp across history_record, history_journalize, f_journal, f_history, history_prev, history_cur, history_next, and cmd_hist; cleared dangling cl_cur_hist pointer in history_cleanup; replaced all read-only bu_vls_addr calls with bu_vls_cstr; in mater.c, added NULL pointer checks on s, s->gedp, ged_dl, dbip, and DMP in mged_color_soltab before dereferencing; in menu.c, eliminated dead/unused Tcl_DString variables in mged_mmenu_set and mmenu_set; added strict index bounds validation (index >= 0 && index < NMENU) in mmenu_set, mmenu_set_all, and cmd_mmenu_get to prevent out-of-bounds memory writes and reads; removed unsafe static storage duration from loop counters menu and item in mmenu_display and mmenu_select to prevent re-entrancy issues; added NULL checks on mptr->menu_string before indexing; added comprehensive NULL pointer guards on s, s->mged_curr_dm, DMP, menu_state, color_scheme, mged_variables, interp, and active_dm_set display managers across btn_item_hit, btn_head_menu, chg_l2menu, cmd_mmenu_get, mmenu_init, mged_menu_refresh, mged_mmenu_set, mmenu_set, mmenu_set_all, mged_highlight_menu_item, mmenu_display, and mmenu_select; and replaced all read-only bu_vls_addr calls with bu_vls_cstr; in menu.h, corrected header guard comment typo. |
|
||||
| `SEC-0289` | `src/mged/mged.c` | `mged.c:357-360, 400, 415-420, 440-460, 490-500, 520-535, 545, 725, 840, 865, 900, 910, 925-975, 995, 1055-1100, 1115-1235, 1270-1360, 1370-1425, 1490, 1530-1765, 1780-1805, 1840-1925, 1970, 2075-2260, 2280, 2410, 2470, 3118, 3155-3165, 3258, 3335, 3390, 3458` | Division by Zero, Memory Leaks, Dead Variable, Out-of-bounds Access, and Null Pointer Dereferences | 2 | `CONFIRMED` | `FIXED` | In BRL-CAD mged Batch 47 (mged.c, 3,532 lines): eliminated floating-point division by zero in event_check when view_state->k.sca == 10.0 (where 1.0 / (1.0 - (view_state->k.sca / 10.0)) evaluated with 0.0 denominator) by validating denominator with ZERO macro; eliminated Tcl_DString memory leak in stdin_input on EOF return under non-cbreak mode; eliminated dead variable place and unused sprintf in mged_finish; guarded s->s_edit before rt_edit_destroy in mged_finish; guarded DMP and dm_bg before array indexing dm_bg[0..2] in main; guarded s->gedp before checking ged_subp table in main; added null pointer checks on s, s->s_edit, MEDIT(s), s->interp, view_state, view_state->vs_gvp, s->mged_curr_dm, DMP, curr_cmd_list, sd, and active display managers across mged_process_char, event_check, stdin_input, std_out_or_err, refresh, mged_finish, apply_cli_overrides, and main; added input_str_index bounds validation in mged_process_char; replaced raw sscanf with bu_sscanf in parse_debug_uint; and replaced all (~45) read-only bu_vls_addr calls with bu_vls_cstr. |
|
||||
| `SEC-0290` | `src/mged/mged.h, src/mged/mged_dm.h, src/mged/mged_impl.cpp, src/mged/mged_impl.h, src/mged/mged_wdb.h` | `mged.h:418-429; mged_dm.h:465, 520-530; mged_impl.cpp:35-43, 45-94, 97-114, 144-151, 154-165, 167-179, 181-193, 196-220; mged_impl.h:22, 57; mged_wdb.h:38-44` | Uninitialized Memory, Missing Header Guards, Duplicate Code, Division by Zero, Resource Leak, and Null Pointer Dereferences | 2 | `CONFIRMED` | `FIXED` | In BRL-CAD mged Batch 48 (mged.h, mged_dm.h, mged_impl.cpp, mged_impl.h, mged_wdb.h, 1,610 lines): in mged_impl.cpp, zero-initialized allocated mged_state using memset to eliminate widespread uninitialized struct pointers and flags; refactored mged_state_create to call mged_state_init_internals, eliminating duplicate 18 callback registrations (DRY); in mged_state_destroy, guarded search_snapshot, dpy_string, s_edit, and s_edit->e before destroying and delegated internal destruction to mged_state_destroy_internals; cleared cmd_map in MGED_Internal destructor; guarded internal callback map lookups, registrations, and sync against null pointers and uninitialized state in mged_internal_clbk_map, mged_state_clbk_set, mged_state_clbk_get, and mged_edit_clbk_sync; in mged.h, guarded s, s->interp, and s->dbip in CHECK_DBI_NULL and CHECK_READ_ONLY macros to prevent null pointer crashes; in mged_dm.h, converted GET_MGED_DM macro to do-while(0) and guarded tp and tp->dm_dmp before dm_get_id to prevent null pointer dereference; guarded VIEWFACTOR against division by zero with ZERO macro; in mged_impl.h, added standard header guard #ifndef MGED_MGED_IMPL_H; in mged_wdb.h, wrapped extern declarations with __BEGIN_DECLS / __END_DECLS for standard C linkage when included in C++ translation units. |
|
||||
| `SEC-0291` | `src/mged/mover.c, src/mged/overlay.c, src/mged/plot.c, src/mged/predictor.c, src/mged/rect.c` | `mover.c:43-65, 75-120; overlay.c:37-67; plot.c:49-265; predictor.c:47-51, 58-64, 73-114, 118-133, 176-200, 324-338; rect.c:66-82, 89-115, 122-127, 133-180, 185-228, 233-239, 243-288, 292-305, 309-380` | Double-Free, File Descriptor Double-Close / Leaks, Logic Bugs, Memory Leaks, Division by Zero, and Null Pointer Dereferences | 2 | `CONFIRMED` | `FIXED` | In BRL-CAD mged Batch 49 (mover.c, overlay.c, plot.c, predictor.c, rect.c, 1,179 lines): in mover.c, eliminated double-free in moveHobj and moveHinstance where rt_db_free_internal was called after rt_db_put_internal failure (which already frees internal database object on all outcomes), fixed memory leak in moveHinstance when combination tree is empty or object is not a combination by calling rt_db_free_internal, initialized internal database object with RT_DB_INTERNAL_INIT, and added null pointer checks on s, dbip, cdp, dp, xlate, and interp; in overlay.c, added null checks on ctp, s, gedp, mged_curr_dm, and DMP, replaced read-only bu_vls_addr with bu_vls_cstr, and explicitly returned TCL_OK; in plot.c, eliminated file descriptor double-close bug where close(fd1[1]) and close(fd3[0]) were executed after fclose(fp_w) and fclose(fp_r), fixed file descriptor leaks when subsequent pipe() calls fail, handled fork() failures gracefully, added _exit(1) after execlp calls to prevent child processes from continuing parent execution on exec failure, verified fp_w and fp_r after fdopen, guarded view_state and vs_gvp before matrix multiplication, replaced sprintf with snprintf, and replaced bu_vls_addr with bu_vls_cstr; in predictor.c, fixed logic bug in poly_trail where t1->t_nused <= 0 was checked twice instead of validating t2->t_nused, guarded division by zero in predictor_frame when frametime is zero using ZERO macro, and added null pointer checks across init_trail, push_trail, poly_trail, predictor_init, predictor_kill, predictor_frame, and predictor_hook; in rect.c, fixed critical crash in zoom_rect_area where rb_set_dirty_flag was passed NULL data causing MGED_CK_STATE abort, guarded against division by zero in rect_image2view when width <= 0, guarded against division by zero in adjust_rect_for_zoom, draw_rect, and zoom_rect_area when window aspect ratio is zero using ZERO macro, replaced bu_vls_addr with bu_vls_cstr, and added null pointer checks on s, mged_curr_dm, DMP, rubber_band, color_scheme, and interp. |
|
||||
| `SEC-0292` | `src/mged/rtif.c, src/mged/scroll.c, src/mged/sedit.h, src/mged/set.c` | `rtif.c:66-85, 100-125, 151-168, 199-265, 281-356, 370-410, 415-440; scroll.c:98-115, 122-132, 134-148, 157-293, 303-332, 335-412, 415-468, 482-553, 561-611; sedit.h:44-67; set.c:132-147, 151-166, 177-198, 208-234, 245-268, 280-294, 323-346, 350-380, 384-415, 424-509, 513-534, 538-556, 565-598, 608-624` | Loop Index Typo / Premature DList Deallocation, File Descriptor Leaks on Interrupt, Array Out-of-Bounds, Division by Zero, and Null Pointer Dereferences | 2 | `CONFIRMED` | `FIXED` | In BRL-CAD mged Batch 50 (rtif.c, scroll.c, sedit.h, set.c, 1,762 lines): in set.c, fixed critical bug in set_dlist where inner loop searching for active display managers sharing display lists used outer index di instead of dj in BU_PTBL_GET and checked uninitialized dlp2, causing the search to always fail and prematurely free active display lists in other display managers; guarded display list scene object list against empty list reads when freeing display lists; guarded against division by zero in set_absolute_model_tran when view scale is zero using ZERO macro; clamped perspective_angle to valid table indices [0..3] in establish_perspective and toggle_perspective preventing out-of-bounds array reads; guarded s, s->s_edit, and MEDIT(s) before syncing mv_context; guarded multi-level pointers in unset_var before dereferencing; guarded active display managers and DMP in set_dirty_flag and set_scroll_private; in rtif.c, fixed file descriptor leak in f_rmats when interrupted via setjmp by ensuring fp is closed before returning; validated and guarded vector list vertices (vp->nused > 0) preventing negative array indexing; added null pointer checks on s, s->gedp, view_state, view_state->vs_gvp, and interp across cmd_rt, cmd_rrt, rt_read, f_rmats, f_nirt, and f_vnirt; replaced atoi with bu_sscanf; in scroll.c, zero-initialized all elements of dm_scroll_array in set_scroll to guarantee NULL termination and bounded scroll_array pointer traversal by array capacity in scroll_display and scroll_select, preventing out-of-bounds array reads; extracted apply_sl_tol helper to eliminate duplicated tolerance thresholding logic (DRY); added null pointer checks on s, s->interp, view_state, DMP, color_scheme, and mged_variables across all event handlers and display routines; in sedit.h, guarded s, s->s_edit, and s->s_edit->e in SEDIT_ROTATE, SEDIT_TRAN, SEDIT_SCALE, and SEDIT_PICK, and guarded s in OEDIT_ROTATE, OEDIT_TRAN, and OEDIT_SCALE macros, preventing null pointer dereference crashes throughout solid and object editing; and replaced all read-only bu_vls_addr calls with bu_vls_cstr. |
|
||||
| `SEC-0293` | `src/mged/setup.c, src/mged/share.c, src/mged/tclsync.c, src/mged/tedit.c` | `setup.c:502-530, 536-578, 585-605, 610-745; share.c:47-70, 98-278, 320-382, 418-448, 452-478, 482-506; tclsync.c:42-59, 100-146, 178-205, 230-245, 275-296, 315-345, 386-425, 476-525; tedit.c:57-75, 78-129, 134-152, 155-184` | Resource Leaks, Wrong Memory Deallocation Bug, Double-Open / File Descriptor Leaks, Array Out-of-Bounds, and Null Pointer Dereferences | 2 | `CONFIRMED` | `FIXED` | In BRL-CAD mged Batch 51 (setup.c, share.c, tclsync.c, tedit.c, 1,978 lines): in share.c, fixed critical bug in usurp_all_resources where freeing a zero-refcount display list state freed MGED_STATE->mged_curr_dm->dm_dlist_state instead of dlp2->dm_dlist_state, corrupting active display manager memory and leaking dlp2 resources; added null checks on dlp1, dlp2, and resource pointers in SHARE_RESOURCE macro; guarded all resource pointers in free_all_resources before decrementing refcounts and freeing, and nullified pointers after cleanup; added null checks on ctp, s, interpreter, and argv in f_share and f_rset; guarded active display managers and pathname lookups in f_share and share_dlist against null pointers; guarded s->mged_curr_dm in f_rset; in tedit.c, fixed file descriptor leak and concurrent double-opening of temporary files by passing bu_temp_file's open file handle directly to writesolid, flushing and closing before invoking external editor; eliminated memory leak of vls buffer in writesolid; bounded primitive type idb_type between ID_NULL and ID_MAX_SOLID before indexing EDOBJ dispatch table in writesolid and readsolid to prevent out-of-bounds memory access; made writesolid, readsolid, and editit static to minimize scope; guarded s, gedp, s_edit, MEDIT(s), view_state, and interp; in setup.c, guarded ctp, s, interp, and ctp->tcl_func in mged_cmd_dispatch; guarded argv[0] in quit usage message; guarded s and interp in cmd_setup; guarded s and view_state before setting vs_flag in mged_refresh_handler_impl and allocating vs_gvp in mged_setup; in tclsync.c, guarded interp, objc, objv, snapshot, record, and strings across EvalWords, ResultCopy, QualifiedPattern, AppendRecord, AppendProc, AppendProcs, AppendVariable, AppendVariables, AppendNamespace, AppendAliases, BuildInterpSnapshot, ReplayRecord, and ReplayInterpSnapshot; and replaced all read-only bu_vls_addr calls with bu_vls_cstr. |
|
||||
| `SEC-0294` | `src/mged/titles.c, src/mged/track.c, src/mged/update.c` | `titles.c:60-165, 175-207, 240-636; track.c:67-555, 558-572, 575-654, 658-691, 695-760, 764-803, 807-817, 821-842, 846-875, 879-903, 908-933; update.c:43-54, 57-79, 88-99, 105-118, 124-134, 142-270` | Division by Zero, Stack Buffer Overrun Risk, String Mutation Bug, Unbounded Array Access, and Null Pointer Dereferences | 2 | `CONFIRMED` | `FIXED` | In BRL-CAD mged Batch 52 (titles.c, track.c, update.c, 1,871 lines): in titles.c, eliminated floating-point division by zero in framerate calculation when frametime is zero using ZERO macro; eliminated in-place destructive mutation of caller's VLS buffer and dropped trailing lines in screen_vls by drawing lines via temporary buffer; bounded global_editing_state array indexing into state_str to prevent out-of-bounds reads; bounded solid type indexing into OBJ array and guarded ft_name before displaying keypoint; guarded MEDIT(s) against NULL before accessing model_changes and e_keypoint; guarded illump against NULL before checking s_old.s_Eflag; guarded s, s->mged_curr_dm, DMP, view_state, view_state->vs_gvp, and s->interp across create_text_overlay and dotitles; replaced sprintf with snprintf; replaced all read-only bu_vls_addr calls with bu_vls_cstr; in track.c, eliminated division by zero in slope when del[0] or slope is zero using ZERO macro and SMALL_FASTF; eliminated division by zero in crdummy when plano[0] - w[0] is zero using ZERO macro; eliminated multiple divisions by zero in top when magnitude of del is zero; clamped cosine values before acos in tancir to prevent NaN return; replaced unsafe custom track_itoa with snprintf; increased solid/region/group name buffers from 9-12 to 32 bytes to prevent name truncation; replaced raw atof with bu_sscanf; scoped all helper functions (crname, slope, crdummy, trcurve, bottom, top, crregion, track_itoa, wrobj, tancir) to static; guarded s, s->dbip, s->wdbp, and s->interp; in update.c, guarded s in mged_update and f_update against NULL pointer dereference; replaced raw sscanf with bu_sscanf; guarded donePtr and eventPtr in event callbacks; guarded clientData, s, interp, and argv[0..2] in f_wait; and replaced bu_vls_addr with bu_vls_cstr. |
|
||||
| `SEC-0295` | `src/mged/usepen.c, src/mged/utility1.c, src/mged/vparse.c, src/mged/wdb_obj.c` | `usepen.c:50-87, 93-177, 184-196, 203-214, 228-337, 369-565; utility1.c:45-73, 78-95, 100-122, 128-149, 156-182, 185-293; vparse.c:34-58, 61-81; wdb_obj.c:66-74, 76-87, 94-127, 130-145, 154-162, 164-186, 188-255, 261-267, 273-281, 284-383, 394-402, 404-560, 570-578, 581-704, 715-722, 724-840, 847-855, 857-868, 879-887, 889-929, 938-945, 960-1074, 1081-1087, 1089-1269, 1279-1286, 1294-1308, 1310-1403, 1416-1424, 1426-1624, 1638-1646, 1648-1677, 1683-1690, 1692-1757, 1767-1775, 1777-1798, 1805-1813, 1912-1926, 1946-1985, 1992-2002, 2010-2027, 2035-2055, 2079-2154, 2161-2168` | Memory Leaks, Dangling Database Pointers, Dead Pre-libged Code, Out-of-bounds Array Access, Command Argument Parsing Bug, In-place String Mutation, and Null Pointer Dereferences | 2 | `CONFIRMED` | `FIXED` | In BRL-CAD mged Batch 53 (usepen.c, utility1.c, vparse.c, wdb_obj.c, 3,149 lines): completing all 55 files of src/mged (100% complete): in usepen.c, eliminated dangerous in-place mutation of argv[1] string in f_matpick by copying into a local buffer before splitting slash path; removed static storage duration from transformation matrices t1 and t2 in wrt_view to make the function re-entrant; guarded against null pointers in illump before accessing s_u_data in f_matpick; guarded s, s->mged_curr_dm, s->gedp, ged_dl(s->gedp), DMP, illump, and illum_gdlp across illuminate, f_aip, and f_matpick; guarded argv[1] against null/empty strings; replaced raw sprintf with snprintf; and replaced all read-only bu_vls_addr calls with bu_vls_cstr; in utility1.c, eliminated over 200 lines of dead pre-libged code, including obsolete unused global variables (path, identt, idbuf, operate, regflag, lastmemb, old_or_new, oper_ok, numsol, numreg, idfd, rd_idfd, tabptr, ctemp) and unused functions/structs (printcodes, Do_printnode, check, id_names, id_to_names); added null checks on s and s->gedp in f_edcolor, f_edcodes, f_edmater, and f_red; and replaced bu_vls_addr with bu_vls_cstr; in vparse.c, added null pointer guards on vls, how_to_parse, structp, argv, and argv[1] across mged_vls_struct_parse and mged_vls_struct_parse_old; in wdb_obj.c, eliminated memory leak of log_str in wdb_track_cmd by adding missing bu_vls_free; fixed database reopen bug in wdb_reopen_cmd where allocating a new wdbp reassigned the local parameter and leaked the new object while leaving callers with a dangling pointer to freed dbip, by updating wdbp->dbip in place; fixed argument index parsing bug in wdb_make_bb_cmd where passing -u caused the bounding routine to treat the new bounding box name as an input object to bound; fixed argument parity condition in wdb_tol_cmd that blocked single-tolerance queries (argc == 2); clamped perpendicularity tolerance to [-1.0, 1.0] before acos to prevent NaN return; fixed wrong return value (returning TCL_OK instead of TCL_ERROR) when object is not an ARB in wdb_move_arb_face_cmd and wdb_rotate_arb_face_cmd; fixed wrong argv indices in error messages in wdb_rotate_arb_face_cmd; dynamically allocated resource structures in wdb_rt_gettrees_cmd eliminating shared static resource state and freeing in wdb_deleteProc_rt; replaced raw sscanf and atof with bu_sscanf; checked floating-point tolerances with ZERO macro; replaced raw sprintf with snprintf; and replaced all (~52) read-only bu_vls_addr calls with bu_vls_cstr. |
|
||||
| `SEC-0296` | `src/proc-db/bottest.c, src/proc-db/brep_cobb.cpp, src/proc-db/brep_cube.cpp, src/proc-db/brep_invalid.cpp, src/proc-db/brep_simple.cpp, src/proc-db/brep_surface.cpp` | `bottest.c:54-68,326-328; brep_cobb.cpp:226-278,285-328; brep_cube.cpp:174,242-295; brep_invalid.cpp:128-135,345-373,400-435; brep_simple.cpp:180,245-295; brep_surface.cpp:60-65,150-160,210-247` | Memory Leaks, Immediate NULL Pointer Dereference Crash, Resource Leaks, Wrong Memory Deallocation, and Missing Parameter Validation | 2 | `CONFIRMED` | `FIXED` | In BRL-CAD proc-db Batch 54 (bottest.c, brep_cobb.cpp, brep_cube.cpp, brep_invalid.cpp, brep_simple.cpp, brep_surface.cpp, 2,010 lines): in bottest.c, fixed immediate SIGSEGV crash when run without arguments by checking argc > 1 before accessing argv[1]; guarded argv[0] before bu_setprogname; checked outfp after wdb_fopen to prevent NULL dereference on write failure; fixed wrong memory deallocator by replacing bu_free with bu_bitv_free(face_mode); and replaced db_close(outfp->dbip) with wdb_close(outfp) to eliminate struct rt_wdb handle leak; in brep_cobb.cpp, eliminated persistent memory leak of 6 heap-allocated ON_NurbsSurface surfaces in Cobb_Sphere by using stack-allocated surfaces in a unified loop, and deleting ON_BezierSurface; guarded argv[0] before bu_setprogname; checked outfp after wdb_fopen; guarded brep before mk_brep; and replaced db_close(outfp->dbip) with wdb_close(outfp); in brep_cube.cpp, fixed immediate SIGSEGV crash when run without arguments by checking argc > 1 before accessing argv[1]; guarded argv[0]; checked outfp after wdb_fopen; eliminated internal database object memory leak by calling rt_db_free_internal(&ip); guarded brep allocation in MakeTwistedCube; and replaced db_close(outfp->dbip) with wdb_close(outfp); in brep_invalid.cpp, eliminated memory leaks in Cobb_Sphere by stack-allocating ON_NurbsSurface and deleting b1; added null check on c2 before appending to trimming loop; validated plate thickness with bu_sscanf; added standard help flags (-h, -?, --help); checked outfp after wdb_fopen; and replaced db_close(outfp->dbip) with wdb_close(outfp); in brep_simple.cpp, fixed immediate SIGSEGV crash when run without arguments by checking argc > 1 before accessing argv[1]; guarded argv[0]; checked outfp after wdb_fopen; eliminated internal database object memory leak by calling rt_db_free_internal(&ip); guarded brep allocation in MakeTwistedCube; replaced db_close(outfp->dbip) with wdb_close(outfp); and replaced raw printf with bu_log; in brep_surface.cpp, guarded brep and c2d curve allocations; validated thickness argument with bu_sscanf; added standard help flags; checked outfp after wdb_fopen; and replaced db_close(outfp->dbip) with wdb_close(outfp). |
|
||||
| `SEC-0297` | `src/proc-db/brep_trimmed.cpp, src/proc-db/breplicator.cpp, src/proc-db/brickwall.c, src/proc-db/cchannel.c, src/proc-db/clutter.c, src/proc-db/common.c` | `brep_trimmed.cpp:548-552, 627-674; breplicator.cpp:40-45, 390-418, 458-470; brickwall.c:75-81, 90-165, 330, 364-370; cchannel.c:60-66, 120-135, 150-168, 211, 220-245, 348; clutter.c:90-115, 140-150, 188-192; common.c:68-72, 94-115` | Resource Leaks, Immediate NULL Pointer Dereference Crash, Division by Zero, Missing Argument Validation, and Memory Leaks | 2 | `CONFIRMED` | `FIXED` | In BRL-CAD proc-db Batch 55 (brep_trimmed.cpp, breplicator.cpp, brickwall.c, cchannel.c, clutter.c, common.c, 2,535 lines): in brep_trimmed.cpp, guarded ON_Brep allocation in MakeBrepFace against NULL return; guarded argv[0] before bu_setprogname; added standard help flags (-h, -?, --help); replaced unsafe atof with bu_sscanf with error checking; checked outfp after wdb_fopen; and replaced db_close(outfp->dbip) with wdb_close(outfp) to eliminate struct rt_wdb handle leak; in breplicator.cpp, added null check and size check (count >= 8) on points in generate_brep; guarded ON_Brep allocation; fixed immediate SIGSEGV crash when run without arguments by checking argc > 1 before accessing argv[1]; guarded argv[0]; and replaced db_close(wdbp->dbip) with wdb_close(wdbp); in brickwall.c, guarded av and *av in parse_args; guarded argv[0] before bu_setprogname; replaced raw sscanf with bu_sscanf; replaced raw sprintf with snprintf; validated units_conv to prevent division by zero; guarded against division by zero in standalone horizontal spacing when horiz_bricks <= 1; and supported standard clean exit on help flags; in cchannel.c, replaced raw sscanf with bu_sscanf with error validation; used ZERO macro for float zero comparisons; fixed infinite loop vulnerability in addHoles by verifying positive step; replaced sprintf with snprintf; guarded argv[0] before bu_setprogname; removed invalid colons requiring arguments from help options string and supported clean exit on -h/-?; checked outfp after wdb_fopen; guarded domain of sqrt calculation; and replaced db_close(db->dbip) with wdb_close(db); in clutter.c, fixed memory leak of bn_unif random buffer by calling bn_unif_free; guarded argv[0] before bu_setprogname; added help flag handling with clean exit; validated wdb_fopen; replaced sprintf with snprintf; and replaced db_close(outfp->dbip) with wdb_close(outfp); in common.c, added null pointer guard on rgb in get_rgb; added null pointer guards on name, pos, dir_at, headp, and outfp in do_light; and guarded against NaN from unitizing zero vectors. |
|
||||
| `SEC-0298` | `src/proc-db/csgbrep.cpp, src/proc-db/donuts.c, src/proc-db/gaia.c, src/proc-db/gears.c` | `csgbrep.cpp:115-125,502-510,550-575; donuts.c:164-169,215,280-325,410-440,650-680,750-775,875-920; gaia.c:54-58,950-985,1020-1065; gears.c:128-132,245-265,305-325,358-410,445-520` | Memory Leaks, Double Free, Handle Leaks, and Missing Argument Validation | 2 | `CONFIRMED` | `FIXED` | In BRL-CAD proc-db Batch 56 (csgbrep.cpp, donuts.c, gaia.c, gears.c, 3,116 lines): in csgbrep.cpp, eliminated external buffer leak ext in write_out with bu_free_external; fixed ON_Brep leak by deleting brep and checking ON_Brep::New; guarded argv[0] before bu_setprogname; supported standard help flags (-h, -?, --help); checked outfp after wdb_fopen; freed extrude.sketch_name and revolve.sketch_name; and replaced db_close(outfp->dbip) with wdb_close(outfp); in donuts.c, replaced unbounded sprintf with snprintf across getName, createLights, createPlane, createEnvironMap, createScene, makeFlake; supported -h and -? in options; replaced raw sscanf with bu_sscanf; fixed inverted logic bug where empty material check tested == 0 instead of != 0; removed undefined fflush(stdin); guarded progname and argv[0]; checked wdb_fopen result fp; freed parameters.materialArray; and replaced db_close(fp->dbip) with wdb_close(fp); in gaia.c, added null pointer guard on path in open_raster_georef; guarded av[0] before bu_setprogname; supported clean help flag exit; replaced atoi and atof with bu_sscanf; and ensured GDAL datasets are closed on texture load failure paths; in gears.c, guarded make_gear against null db_fp and teeth <= 0; eliminated double free risk by freeing scratch arrays verts/lsegs/segments/reverse once and cleaning up gear_head wmembers; guarded av[0]; supported help flags (-h, -?, --help); replaced atof and atoi with bu_sscanf; cleaned up all_head wmembers; and replaced db_close(db_fp->dbip) with wdb_close(db_fp). |
|
||||
| `SEC-0299` | `src/proc-db/globe.c, src/proc-db/gtimes.c, src/proc-db/helicoil.c, src/proc-db/kurt.c, src/proc-db/lattice.c, src/proc-db/lens.c` | `globe.c:42-46,67-86,115-148,165-179; gtimes.c:44-63,77-81,101-115; helicoil.c:92-105,190-222,370-381; kurt.c:64-75,124-145,212-218,238-245,268-275; lattice.c:228-235,299-335,530-552; lens.c:73-143,147-218,223-258,270-333` | Immediate NULL Pointer Dereference Crashes, Uninitialized Memory Access, Memory Leaks, Infinite Loop, and Handle Leaks | 2 | `CONFIRMED` | `FIXED` | In BRL-CAD proc-db Batch 57 (globe.c, gtimes.c, helicoil.c, kurt.c, lattice.c, lens.c, 1,910 lines): in globe.c, guarded progname and av[0]; added clean exit on help flags (-h, -?, --help); replaced atof with bu_sscanf; validated stepSize > 0 (eliminating infinite loop denial of service), initialSize > 0, and finalSize > initialSize (eliminating division by zero in shader params); replaced sprintf with snprintf; eliminated persistent leaks of wmember list nodes across loop iterations by calling mk_freemembers(&wm_hd.l) and mk_freemembers(&bigList.l); and replaced db_close(db_fp->dbip) with wdb_close(db_fp) to fix struct rt_wdb handle leak; in gtimes.c, guarded av[0] before bu_setprogname; supported standard help options (-h, -?); replaced atoi with bu_sscanf; guarded against out-of-bounds pointer dereference when no file argument is given; guarded wdbp from wdb_dbopen against NULL; called ged_free(&ged) on every iteration to fix persistent ged container memory leaks; and replaced printf with bu_log; in helicoil.c, guarded build_helix against NULL head and non-positive turns; guarded av[0]; added clean help exit (-h, -?, --help); replaced atoi and atof with bu_sscanf; freed coil_hd and all_hd wmember lists with mk_freemembers; and replaced db_close(db_fp->dbip) with wdb_close(db_fp); in kurt.c, guarded argv[0] before bu_setprogname; added clean exit on help flags; checked outfp after wdb_fopen; in do_cell, guarded vp->v_n < 3 and fixed critical array index bug in sort loop that iterated over nroots instead of vp->v_n (which caused sorting of uninitialized memory); freed head wmembers in make_surface; guarded against division by zero in vector unitize in pnorms and do_light; and replaced db_close(outfp->dbip) with wdb_close(outfp); in lattice.c, guarded subdivide_face against freq < 1 or freq > MAX_FREQ; guarded av[0] before bu_setprogname; supported clean help exit; replaced atoi and atof with bu_sscanf; clamped frequency to MAX_FREQ; freed dome_head, light_head, and all_head wmembers with mk_freemembers; and replaced db_close(db_fp->dbip) with wdb_close(db_fp); in lens.c, fixed immediate SIGSEGV crash when run without filename where av[bu_optind] was NULL and passed to %s in bu_log; checked wdb_fopen return; guarded discriminant and radicand against negative values and ref_ind against zero; freed VLS buffers str, lens_type, and name; freed lensglass and lens wmembers; replaced sscanf with bu_sscanf; and replaced db_close(db_fp->dbip) with wdb_close(db_fp). |
|
||||
| `SEC-0300` | `src/proc-db/loftwing.c, src/proc-db/masonry.c, src/proc-db/menger.c` | `loftwing.c:95-125,145-175,225-235,390-445,465-490,505-525,535-610; masonry.c:125-135,200-215,220-345,600-685,775-826,835-875,885-970,1000-1010,1020-1065; menger.c:63-68,267-330,355-425,450-465,480-565` | Division by Zero, Memory Leaks, Denial of Service via Unbounded Recursion, and Handle Leaks | 2 | `CONFIRMED` | `FIXED` | In BRL-CAD proc-db Batch 58 (loftwing.c, masonry.c, menger.c, 2,245 lines): in loftwing.c, guarded naca_eval against negative x and p >= 1.0 (preventing division by zero); guarded naca_outline against npts < 4 and non-positive nupper/nlower; guarded build_loft against NULL pointers and invalid counts; guarded av[0] before bu_setprogname; added clean exit on help flags (-h, -?, --help); replaced atoi and atof with bu_sscanf with error checks; clamped points, stations, blades, span, and chord to valid positive ranges; eliminated persistent memory leaks of wm_hd wmembers across wing and blade branches by calling mk_freemembers; ensured db_fp and allocated buffers are freed on error exits; and replaced db_close(db_fp->dbip) with wdb_close(db_fp) to eliminate struct rt_wdb handle leak; in masonry.c, guarded set_translate and set_rotate with bu_sscanf and initialized coordinates; guarded av and *av in parse_args before bu_path_component; supported standard help exit (-h, -?); replaced raw sscanf and atof with bu_sscanf; guarded studs and span in frame_opening to prevent division by zero; freed s_hd boardseg head and wm_hd wmembers in frame; guarded sheetrock against non-positive dimensions and freed wm_hd wmembers; guarded mortar_brick against non-positive wall/brick dimensions (preventing division by zero) and freed wm_hd wmembers; freed wm_hd wmembers in brick; freed ol_hd opening list and trans_matrix in main; and replaced db_close(db_fd->dbip) with wdb_close(db_fd); in menger.c, guarded comb, depth, width, and height in slice against NULL/invalid extents; in mengerize, guarded against empty pattern or zero repeat; eliminated persistent leaks of levels[slot]->l and final->l wmembers by calling mk_freemembers; guarded av[0] before bu_setprogname; limited repeat to maximum 5 to eliminate denial-of-service memory exhaustion from recursive fractal generation; replaced heap allocation of menger, ground, light0, light1, sponge with stack allocation and freed their wmembers with mk_freemembers; freed boxes VLS container; and replaced db_close(fp->dbip) with wdb_close(fp). |
|
||||
| `SEC-0301` | `src/proc-db/metaball.c, src/proc-db/molecule.c, src/proc-db/nmgmodel.c, src/proc-db/parashot.c, src/proc-db/pdb-g.cpp` | `metaball.c:64-70,88,118-120,135-163,165-170,205-210,230-265; molecule.c:39-46,75-94,105-188,190-230,235-280; nmgmodel.c:70-115,535-590; parashot.c:60-75,80-94,115-165,285-290; pdb-g.cpp:155-215,220-268,270-340` | Buffer Over-reads, Out-of-Bounds Memory Access, Memory Leaks, and Handle Leaks | 2 | `CONFIRMED` | `FIXED` | In BRL-CAD proc-db Batch 59 (metaball.c, molecule.c, nmgmodel.c, parashot.c, pdb-g.cpp, 1,761 lines): in metaball.c, guarded make_meatballs against NULL name and non-positive count (eliminating division by zero in sqrt); in mix_balls, called rt_db_free_internal to eliminate persistent internal object memory leaks for every input object; checked wdbp returned by wdb_dbopen; guarded av and av[0] before bu_setprogname; added clean exit 0 on help flags (-h, -?); replaced atoi with bu_sscanf with range validation [1, 1000000]; and replaced db_close(fp->dbip) with wdb_close(fp) to eliminate struct rt_wdb handle leak; in molecule.c, guarded argv[0] before bu_setprogname; supported standard help flags with exit 0 (-h, -?, --help); checked outfp from wdb_fopen against NULL; rewrote read_data to use line-by-line reading with bu_fgets and bu_sscanf to eliminate infinite loop denial of service on non-numeric input; added bounds checking on atom indices and types to eliminate out-of-bounds array reads in atom_list; replaced unsafe sprintf with snprintf; increased s_name buffer to prevent truncation; freed reg_head and head wmembers with mk_freemembers; freed allocated sphere linked list to fix memory leak; and replaced db_close(outfp->dbip) with wdb_close(outfp); in nmgmodel.c, guarded av and *av before bu_path_component; supported clean exit 0 on help flags (-h, -?); freed model m with nmg_km if wdb_fopen fails; and replaced db_close(fdmodel->dbip) with wdb_close(fdmodel); in parashot.c, guarded argv[0] before bu_setprogname; supported clean exit 0 on help flags (-h, -?); replaced raw sscanf, atoi, and atof with bu_sscanf; validated step count and pipe diameter; and replaced db_close(fp->dbip) with wdb_close(fp); in pdb-g.cpp, fixed buffer over-read vulnerability when parsing fixed-column PDB records (ATOM/HETATM) on short lines by trimming newlines and padding lines up to 80 characters with spaces; replaced raw sscanf with bu_sscanf; supported clean help exit (-h, -?, --help); derived default output geometry file if omitted; freed allocated header string with bu_free; freed all_atoms wmembers with mk_freemembers; and replaced db_close(db_fp->dbip) with wdb_close(db_fp). |
|
||||
| `SEC-0302` | `src/proc-db/pipe.c, src/proc-db/pipetest.c, src/proc-db/pix2g.c, src/proc-db/pyramid.c, src/proc-db/ringworld.c` | `pipe.c:169-173,248-251,320-335,465-475,477-485,508-540,579-605,607-640,683-748,755-765,789-805; pipetest.c:110-128,146-160,168-175,193-200; pix2g.c:63-70,147-164,170-198,201-225,254-270; pyramid.c:55-87,123-125,138-155,158-164; ringworld.c:66-78,82-111,126-146,148-154,160-170` | Free of Memory Not on Heap, Buffer Over-read, Race Condition, Unbounded Recursion, and Memory Leaks | 2 | `CONFIRMED` | `FIXED` | In BRL-CAD proc-db Batch 60 (pipe.c, pipetest.c, pix2g.c, pyramid.c, ringworld.c, 1,641 lines): in pipe.c, clamped Normals dot product to [-1.0, 1.0] before acos to prevent NaN; guarded tangent and cosine denominators against zero with ZERO(); fixed memory leaks and cumulative combination list corruption across pipe and elbow generations by calling mk_freemembers(&head.l) after every mk_lfcomb; guarded argv[0] before bu_setprogname; added clean exit 0 on -h and -?; replaced raw scanf with bu_fgets and bu_sscanf with validation; guarded against NULL pointer dereference in Names() and main() when fewer than two points are read; freed root points linked list; and replaced db_close(fdout->dbip) with wdb_close(fdout); in pipetest.c, fixed critical heap corruption crash (CWE-590: Free of Memory not on the Heap) by dynamically allocating pipe points via mk_pipe_init and mk_add_pipe_pnt instead of passing static array elements to mk_pipe which takes ownership and frees on export; guarded argv[0]; fixed unconditional usage message; supported clean exit 0 on help flags (-h, -?, --help); checked wdb_fopen return; added NULL guards in do_bending and pr_pipe; freed pipe points with mk_pipe_free; and replaced db_close(outfp->dbip) with wdb_close(outfp); in pix2g.c, guarded av[0] before bu_setprogname; supported clean exit 0 on -h, -?, --help; replaced atoi and atof with bu_sscanf with range validation [1, 65536] on dimensions and positive checks on cell/object sizes; prevented buffer over-read (CWE-125) and crash when image buffer is smaller than width * height * 3 by halting with error instead of continuing to read past buffer end; eliminated critical race condition and list corruption across parallel worker threads by acquiring BU_SEM_GENERAL semaphore when modifying global allScanlineList; eliminated persistent leaks of hundreds of thousands of wmember list nodes by calling mk_freemembers on wm_hd, scanlineList, and allScanlineList; and replaced db_close(db_fp->dbip) with wdb_close(db_fp); in pyramid.c, removed unused dead function pnorms; guarded argv[0] before bu_setprogname; supported clean exit 0 on -h, -?, --help; replaced atoi with bu_sscanf and clamped recursion depth to [1, 8] to prevent denial of service from unbounded recursive branching; checked wdb_fopen return; eliminated persistent memory leaks in recursive tree generation by calling mk_freemembers(&head.l); and replaced db_close(outfp->dbip) with wdb_close(outfp); in ringworld.c, guarded argv[0] before bu_setprogname; supported clean exit 0 on -h and -?; checked wdb_fopen return; eliminated wmember list node leaks in mk_sol, mk_ring, and main by calling mk_freemembers(&c.l); and replaced db_close(fp->dbip) with wdb_close(fp). |
|
||||
| `SEC-0303` | `src/proc-db/seashell.c, src/proc-db/sketch.c, src/proc-db/specimen.c, src/proc-db/sphflake.c, src/proc-db/spltest.c` | `seashell.c:56-65,475-485,502-535,555-570,610-660; sketch.c:60-70,120-135,170-185; specimen.c:30-40,110-120,380-435; sphflake.c:95-105,150-165,190-230,285-365,370-385,470-490,575-585; spltest.c:55-65,75-85,145-175,190-205` | Memory Leaks, Handle Leaks, Unbounded Recursion Denial of Service, Division by Zero, and Input Validation | 2 | `CONFIRMED` | `FIXED` | In BRL-CAD proc-db Batch 61 (seashell.c, sketch.c, specimen.c, sphflake.c, spltest.c, 2,106 lines): in seashell.c, guarded superformula against n1 == 0 with ZERO() to prevent division by zero in pow(); guarded argv[0] before bu_setprogname; added clean exit 0 on -h, -?, --help; replaced atof and atoi with bu_sscanf with range validation on --turns, --expand, and --res; eliminated persistent wmember list node leaks across combinations by calling mk_freemembers(&all_hd.l); and replaced db_close(db_fp->dbip) with wdb_close(db_fp) to fix struct rt_wdb handle leak; in sketch.c, guarded argv[0] before bu_setprogname; removed dead option parsing block that caused unconditional abort on any argument; supported clean exit 0 on -h, -?, --help; checked outfp returned by wdb_fopen against NULL; freed all_head wmembers with mk_freemembers; and replaced db_close(outfp->dbip) with wdb_close(outfp); in specimen.c, guarded av[0] before bu_setprogname; supported clean exit 0 on -h, -?, --help; replaced atof with bu_sscanf and validated spacing >= 100.0; freed reg_hd wmembers after every specimen shelf region and freed gnd_hd, lt_hd, and all_hd wmembers in main to eliminate widespread heap leaks; and replaced db_close(db_fp->dbip) with wdb_close(db_fp); in sphflake.c, guarded argv[0] before bu_setprogname; supported clean exit 0 on -h, -?, --help; clamped recursion depth to [0, 5] using bu_sscanf to eliminate denial of service from exponential tree explosion; checked fp returned by wdb_fopen against NULL; eliminated massive memory leak by freeing all wmemberArray entries with mk_freemembers before bu_free; removed undefined behavior fflush(stdin) calls; replaced unsafe sprintf and sscanf with snprintf and bu_sscanf; and replaced db_close(fp->dbip) with wdb_close(fp); in spltest.c, guarded argv[0] before bu_setprogname; supported clean exit 0 on -h, -?, --help; guarded make_face against NULL pointers and unsupported order; checked srf returned by nmg_nurb_new_snurb; and replaced db_close(fp->dbip) with wdb_close(fp). |
|
||||
| `SEC-0304` | `src/proc-db/surfaceintersect.cpp, src/proc-db/surfaceintersect.h, src/proc-db/tea.c, src/proc-db/tea.h, src/proc-db/tea_nmg.c` | `surfaceintersect.cpp:32,75-80,325-354,374-405,444-450,595-605,655-685,965-985,1060-1145; tea.c:43-88,96-140; tea.h:42,352; tea_nmg.c:50-135,165-245` | Use-After-Free, Infinite Loops, Memory Leaks, File Descriptor Leak, Handle Leaks, and Missing Input Bounds Checks | 2 | `CONFIRMED` | `FIXED` | In BRL-CAD proc-db Batch 62 (surfaceintersect.cpp, surfaceintersect.h, tea.c, tea.h, tea_nmg.c, 2,014 lines): in surfaceintersect.cpp, corrected inverted SI_MIN macro; guarded against division by zero in Step when normal cross product magnitude is zero; eliminated unbounded memory leaks and fixed typo in CurveCurveIntersect by properly deleting split curve objects left1/right1/left2/right2 and intersecting right1 with right2; updated SetCurveCurveIntersectionDir to use reference parameter so intersection direction updates are not discarded on copy, enabled the negative dot product branch (dot < 0), fixed typo that wrote m_dirB[0] twice, and made curve parameters const; fixed arguments to SetCurveCurveIntersectionDir in Get_ON_X_Events; capped Jiggle iteration loops in WalkIntersection and GetStartPointsInternal to prevent infinite loop denial of service; in GetStartPointsInternal, eliminated 12 heap-allocated ON_Surface leaks per recursion node and corrected return value accumulator from &= to |=; cleaned up dynamically allocated curves in BrepBrepIntersect before returning; in main(), guarded argv[0] before bu_setprogname, supported clean exit 0 on -h/-?/-help, checked wdb_fopen return, freed all wmembers with mk_freemembers, and replaced db_close(db_fp->dbip) with wdb_close(db_fp) to fix struct rt_wdb handle leak; in tea.h, marked ducks and patches as static const to prevent multiple-definition linker collisions and inadvertent table modification; in tea.c, guarded argv[0] before bu_setprogname, supported clean exit 0 on -h/-?, checked wdb_fopen return, added NULL check in dump_patch, added array bounds checks on patch indices before accessing ducks[], and replaced db_close(outfp->dbip) with wdb_close(outfp); in tea_nmg.c, fixed critical CWE-416 Use-After-Free vulnerability where nmg_m_to_vlist accessed model m after mk_nmg/wdb_export had already freed it by generating the vlist prior to exporting, fixed file descriptor leak by calling fclose(fp) on the plot3 file, freed vlist nodes with BV_FREE_VLIST, guarded argv[0] before bu_setprogname, supported clean exit 0 on -h/-?, checked wdb_fopen return, checked nmg_mm() return, added bounds checks on patch indices, and replaced db_close(outfp->dbip) with wdb_close(outfp). |
|
||||
| `SEC-0305` | `src/proc-db/terragen.c, src/proc-db/torii.c, src/proc-db/tube.c, src/proc-db/twistedcube.cpp, src/proc-db/twistedcube.h` | `terragen.c:120-145,280-305,335-415; torii.c:100-145,170-185,200-245; tube.c:125-155,205-245,265-295,400-470,485-500,510-530,535-555; twistedcube.cpp:35-45,120-130,165-175,210-220; twistedcube.h:1-71` | Memory Leaks, Handle Leaks, Combination List Corruption, File Descriptor Leaks, and Missing Input Bounds Checks | 2 | `CONFIRMED` | `FIXED` | In BRL-CAD proc-db Batch 63 (terragen.c, torii.c, tube.c, twistedcube.cpp, twistedcube.h, 1,474 lines): in terragen.c, guarded av[0] before bu_setprogname, supported clean exit 0 on -h/-?/--help, replaced atoi and atof with bu_sscanf, added cleanup freeing hf and grid and calling wdb_close on sidecar write failure, freed combination members after terrain.r, water.r, sky.r, and all combs with mk_freemembers, and replaced db_close(db_fp->dbip) with wdb_close(db_fp); in torii.c, guarded av[0] before bu_setprogname, supported clean exit 0 on -h/-?/--help, replaced atoi and atof with bu_sscanf, validated rows and cols (clamped 1..200) and major/minor radii to prevent denial-of-service memory/disk exhaustion, freed all_hd wmembers with mk_freemembers on error paths and normal completion, and replaced db_close(db_fp->dbip) with wdb_close(db_fp); in tube.c, guarded argv[0] before bu_setprogname, supported clean exit 0 on -h/-?/--help, checked outfp returned by wdb_fopen against NULL, closed pos_fp with fclose, eliminated combination list corruption and memory leaks across frames by freeing head.l after bg.r and both head.l and ghead.l on every frame iteration with mk_freemembers, freed head.l in build_cyl with mk_freemembers, checked npts <= 0 and bp in build_spline, added bounds check on nsamples (< 1022) to prevent sample array overflow and replaced sscanf with bu_sscanf in read_frame, replaced fscanf with bu_fgets and bu_sscanf in read_pos, guarded against division by zero in xfinddir with ZERO(denom), and replaced db_close(outfp->dbip) with wdb_close(outfp); in twistedcube.cpp, added array bounds checks on from and to vertex indices against brep.m_V.Count() in MakeTwistedCubeEdge, validated face.m_si and checked surface pointer in MakeTwistedCubeTrimmingLoop, checked edge index ei against brep.m_E.Count(), and added NULL check on bi in printPoints; in twistedcube.h, reviewed clean. |
|
||||
| `SEC-0306` | `src/proc-db/vegetation.c, src/proc-db/vegetation.h, src/proc-db/voxelize.c, src/proc-db/wavy.c, src/proc-db/wdb_example.c` | `vegetation.c:200-230,590-645,750-800,810-850,885-985; vegetation.h:135-145,165-175; voxelize.c:235-265,380-430,445-505; wavy.c:60-95,115-125; wdb_example.c:50-65,130-140` | Memory Leaks, Handle Leaks, Combination List Corruption, Allocator Mismatches, Double Free, and Uninitialized Macro Member | 2 | `CONFIRMED` | `FIXED` | In BRL-CAD proc-db Batch 64 (vegetation.c, vegetation.h, voxelize.c, wavy.c, wdb_example.c, 1,995 lines): completing all 55 files of src/proc-db (100% complete): in vegetation.h, fixed uninitialized branchMaxVariation bug in INIT_CHARACTERISTIC_T macro caused by setting dirMaxVariation twice; replaced unsafe sprintf with bu_strlcpy in INIT_OUTPUTCOUNTER_T; in vegetation.c, fixed memory leak of bigList on error in findIntersectors; replaced system free with bu_free on bu_calloc/BU_ALLOC buffers (segList, excluded, included, plant, and structure allocations) to eliminate allocator mismatch; fixed persistent leaks of included and excluded segment lists during growth retries; implemented recursive freeStructure helper to eliminate memory leaks of deeply nested substructures, branches, and segments in destroyPlant; freed oc->combination.l and oc->region.l wmembers with mk_freemembers; guarded argv[0] before bu_setprogname; supported clean exit 0 on -h/-?/--help; replaced atoi, atof, and atol with bu_sscanf with range validation and clamped age [1, 200] to prevent memory/CPU exhaustion; checked fp from wdb_fopen against NULL; and replaced db_close(fp->dbip) with wdb_close(fp); in voxelize.c, guarded av[0] before bu_setprogname; supported clean exit 0 on -h/-?/--help; replaced atoi with bu_sscanf; freed voldata and ebmdata buffers and closed db_fp on sidecar write and primitive creation failures; freed region_hd.l, ebm_hd.l, and all_hd.l wmembers with mk_freemembers; and replaced db_close(db_fp->dbip) with wdb_close(db_fp); in wavy.c, guarded argv[0] before bu_setprogname; fixed option parsing so -h and -? exit 0 cleanly with usage; replaced atof with bu_sscanf; checked outfp returned by wdb_fopen; documented ownership transfer where mk_bspline/wdb_export takes ownership and frees surfaces via rt_nurb_ifree, avoiding double free; and replaced db_close(outfp->dbip) with wdb_close(outfp); in wdb_example.c, guarded av[0] before bu_setprogname; supported clean exit 0 on -h/-?/--help; eliminated combination member leak by freeing wm_hd.l with mk_freemembers; and replaced db_close(db_fp->dbip) with wdb_close(db_fp). |
|
||||
| `SEC-0307` | `src/qged/QgEdApp.cpp, src/qged/QgEdApp.h, src/qged/QgEdFilter.cpp, src/qged/QgEdFilter.h, src/qged/QgEdMainWindow.cpp, src/qged/QgEdMainWindow.h` | `QgEdApp.cpp:90-95,110-117,315-325,410-430,445-455,485-492,500-505,520-535,625-640; QgEdApp.h:1-119; QgEdFilter.cpp:33-40,70-75; QgEdFilter.h:1-44; QgEdMainWindow.cpp:90-100,105-110,238-245,375-385,410-415,440-445,455-505; QgEdMainWindow.h:50-55,60-65,107-115` | Allocator Mismatch, Memory Leaks, Uninitialized Pointers, and NULL Pointer Dereferences | 2 | `CONFIRMED` | `FIXED` | In BRL-CAD qged Batch 65 (QgEdApp.cpp, QgEdApp.h, QgEdFilter.cpp, QgEdFilter.h, QgEdMainWindow.cpp, QgEdMainWindow.h, 1,604 lines): in QgEdApp.cpp, fixed allocator mismatch (CWE-762) by replacing C++ delete on bu_strdup strings with bu_free(tmp_av[i], "tmp_av str"); fixed memory leak of argv array av allocated with bu_calloc in QgEdApp::run_cmd; added cleanup loop in QgEdApp destructor to free any pending tmp_av strings; added NULL pointer checks on p->gedp, p->gedp->ged_io_data, ca->w, and ca->w->console before dereferencing in qt_create_io_handler and qt_delete_io_handler; guarded w and w->CurrentView() before dereferencing in run_cmd; guarded el, el->controls, and w->CurrentDisplay() in element_selected; added NULL guards on ctx and valp in raytrace_start and raytrace_done; in QgEdApp.h, audited clean; in QgEdFilter.cpp, added NULL pointer checks on event e and application model pointer c->mdl before accessing interaction_mode; in QgEdFilter.h, audited clean; in QgEdMainWindow.h, removed duplicate QgView.h include, and initialized pointer members console, cad_open, cad_save_settings, and cad_exit to NULL to prevent uninitialized memory reads (CWE-457); in QgEdMainWindow.cpp, added NULL pointer guards on c4 across isValid3D, isDisplayActive, CurrentDisplay, CurrentView, DisplayCheckpoint, DisplayDiff, QuadDisplay, SingleDisplay, and constructor mode switching; added NULL guards on vcw in IndicateRaytraceStart and IndicateRaytraceDone; added NULL guards on w and qApp in widget_active; and added NULL guards on ap->mdl and ap->mdl->gedp in CreateWidgets, ConnectWidgets, and do_dm_init. |
|
||||
| `SEC-0308` | `src/qged/QgEdPalette.cpp, src/qged/QgEdPalette.h, src/qged/fbserv.cpp, src/qged/fbserv.h, src/qged/main.cpp` | `QgEdPalette.cpp:40-50,95-105,108-115,135-140; QgEdPalette.h:1-62; fbserv.cpp:50-95,120-135,178-204,208-223,225-245,260-270,280-290,315-375; fbserv.h:44-50,85-90; main.cpp:70-75,100-105,135-150` | Memory Leaks, Uninitialized Pointers, Out-of-bounds Array / Buffer Access, and NULL Pointer Dereferences | 2 | `CONFIRMED` | `FIXED` | In BRL-CAD qged Batch 66 (QgEdPalette.cpp, QgEdPalette.h, fbserv.cpp, fbserv.h, main.cpp, 881 lines): in QgEdPalette.cpp, initialized filenames pointer to NULL before bu_file_list and guarded bu_argv_free, added NULL checks on cmd, cmd->i, cmd->i->tool_create, and returned tool element el before inserting into c_map and calling addElement, and guarded selected->button before setStyleSheet; in QgEdPalette.h, audited clean; in fbserv.h, initialized pointer and index members (s = nullptr, ind = -1, fbsp = nullptr) in QFBSocket and fbsp in QFBServer to prevent uninitialized memory access (CWE-457); in fbserv.cpp, guarded fbsp, s, ind bounds, and pkc in QFBSocket::client_handler, checked realloc return before updating pkc_inbuf to prevent NULL dereference on allocation failure, guarded buffer length and bounds (pkc_inend >= 0 && pkc_inend < pkc_inlen) before copying remaining data; in QFBServer::on_Connect, guarded nextPendingConnection return, fbsp, and validated socket descriptor fd >= 0 before pkg_adopt_socket; in qdm_is_listening and qdm_listen_on_port, checked fbsp against NULL; in qdm_open_server_handler and qdm_close_server_handler, guarded fbsp and listener channel nl, and cleared fbsl_chan and fbsl_fd to avoid dangling pointers; in qdm_open_client_handler and qdm_open_sw_client_handler, added client index bounds checks (0 <= i < fbs_max_clients) and guarded data, s->s, and fbsp->fbs_fbp; in qdm_close_client_handler, guarded client index and cleared fbsc_chan to NULL; in QFBIPCSocket::ipc_handler, guarded fbsp, ind bounds, notifier, and fbsc_pkg before client processing; in qdm_open_ipc_client_handler, qdm_open_ipc_sw_client_handler, and qdm_close_ipc_client_handler, added client index bounds checks and guarded fbsp->fbs_fbp; in main.cpp, guarded argc < 1, argv, and argv[0] before bu_setprogname to prevent NULL pointer dereference crashes on empty argument vectors, guarded argv[i] in option scanning loop, eliminated memory leaks of bu_vls msg on error paths and prior to QApplication launch by adding bu_vls_free(&msg). |
|
||||
| `SEC-0309` | `src/qged/plugins/plugin.h, src/qged/plugins/edit/ell/QEll.cpp, src/qged/plugins/edit/ell/QEll.h, src/qged/plugins/edit/ell/ell_tool.cpp, src/qged/plugins/view/info/CADViewModel.cpp, src/qged/plugins/view/info/CADViewModel.h, src/qged/plugins/view/info/view_info.cpp` | `plugin.h:1-74; QEll.h:44-58; QEll.cpp:35-43,80-92,94-123,138-165,170-240,245-285,290-295; ell_tool.cpp:28-48; CADViewModel.h:1-63; CADViewModel.cpp:42-47,56-102; view_info.cpp:28-42` | Illegal Free of Non-Heap Member, Double Free, Memory Leaks, Uninitialized Pointers, Model Invariant Violations, and NULL Pointer Dereferences | 2 | `CONFIRMED` | `FIXED` | In BRL-CAD qged Batch 67 (plugin.h, QEll.cpp, QEll.h, ell_tool.cpp, CADViewModel.cpp, CADViewModel.h, view_info.cpp, 777 lines): in plugin.h, audited clean; in QEll.h, initialized all pointer member variables (O_pnt, A_axis, B_axis, C_axis, ell_name, write_edit, make_sph, reset_values) to nullptr to prevent uninitialized pointer reads (CWE-457); in QEll.cpp, cleared struct rt_ell_internal ell with memset(&ell, 0, sizeof(ell)) in constructor; connected write_edit and reset_values buttons to their write_to_db and read_from_db slots; in destructor, set p = NULL after bv_obj_put(p); in read_from_db, guarded qApp against NULL and checked ellp against NULL before RT_ELL_CK_MAGIC; in write_to_db, fixed illegal free of non-heap C++ object member &ell (CWE-763/CWE-590) and subsequent double free (CWE-415) by dynamically allocating ellp via BU_ALLOC and relying on rt_db_put_internal's internal deallocation without redundant and dangerous rt_db_free_internal calls; in update_obj_wireframe, guarded qApp, gedp->dbip, p from bv_obj_get, wdbp from wdb_dbopen, child scene object s, and pl[i].str against NULL pointer dereferences; in update_viewobj_name, guarded qApp, gedp->dbip, p, and ell_name against NULL dereferences; in eventFilter, added NULL guard on event pointer e; in ell_tool.cpp, converted heap-allocated QIcon to stack allocation to eliminate memory leak (CWE-401); in CADViewModel.h, audited clean; in CADViewModel.cpp, guarded qApp and bview pointer v against NULL in refresh, and invoked beginResetModel before deleting m_root to preserve Qt model invariants and avoid use-after-free by attached views; set m_root = NULL in destructor; in view_info.cpp, converted heap-allocated QIcon to stack allocation and parented CADViewModel to vview to eliminate memory leaks (CWE-401). |
|
||||
| `SEC-0310` | `src/qged/plugins/view/measure/CADViewMeasure.cpp, src/qged/plugins/view/measure/CADViewMeasure.h, src/qged/plugins/view/measure/measure.cpp, src/qged/plugins/view/select/CADViewSelector.cpp, src/qged/plugins/view/select/CADViewSelector.h, src/qged/plugins/view/select/select.cpp, src/qged/plugins/view/settings/CADViewSettings.cpp, src/qged/plugins/view/settings/CADViewSettings.h, src/qged/plugins/view/settings/view_settings.cpp` | `CADViewMeasure.h:26-55; CADViewMeasure.cpp:88-95,98-106,115-145,155-186; measure.cpp:30-46; CADViewSelector.h:44-94; CADViewSelector.cpp:144-146,193-221,220-246,244-271,269-290,286-320,313-350,341-408; select.cpp:31-47; CADViewSettings.h:40-64; CADViewSettings.cpp:41-55,185-226,228-267; view_settings.cpp:30-43` | Memory Leaks, Uninitialized Pointers, Argument Indexing Corruption, and NULL Pointer Dereferences | 2 | `CONFIRMED` | `FIXED` | In BRL-CAD qged Batch 68 (CADViewMeasure.cpp, CADViewMeasure.h, measure.cpp, CADViewSelector.cpp, CADViewSelector.h, select.cpp, CADViewSettings.cpp, CADViewSettings.h, view_settings.cpp, 1,374 lines): in CADViewMeasure.h, removed duplicate QLineEdit include and initialized pointer members to nullptr to avoid uninitialized memory reads (CWE-457); in CADViewMeasure.cpp, freed f2d and f3d filters in destructor to fix memory leak (CWE-401); in adjust_text, eliminated persistent memory leak of QLabel on every event by reusing ma_label instead of repeatedly reallocating new QLabel instances; guarded qApp, gedp->ged_gvp, gedp->dbip, mf, and reports against NULL dereferences; in update_color and eventFilter, guarded mf, measure_3d, color_3d, color_2d, and filters; in measure.cpp, converted heap-allocated QIcon to stack allocation to prevent memory leak (CWE-401); in CADViewSelector.h, initialized all pointer members (including filter pointers pf, bf, rf) to nullptr; in CADViewSelector.cpp, freed pf, bf, and rf in destructor to fix memory leak (CWE-401); in select_objs and deselect_objs, guarded gedp, dbi_state, cf, and scene object s against NULL; in erase_objs, fixed indexing bug in av array where NULL scene objects created holes in the argv vector passed to ged_exec_erase, and checked scnt > 1 before execution; in do_draw_selections, do_erase_selections, and do_view_update, guarded dbis->pathstr return before calling bu_strdup and constructing std::string; in eventFilter, added NULL guards on event e, qApp, filters, and checkboxes; in select.cpp, converted heap-allocated QIcon to stack allocation to prevent memory leak (CWE-401); in CADViewSettings.h, initialized all pointer members to nullptr; in CADViewSettings.cpp, added NULL checks on cb in set_ckbx and ckbx_val; in checkbox_refresh and view_refresh, guarded qApp, gedp, bview v, v->gv_s, and fb_mode_combo against NULL pointer dereferences; in view_settings.cpp, converted heap-allocated QIcon to stack allocation to eliminate memory leak (CWE-401). |
|
||||
| `SEC-0311` | `src/qged/plugins/polygon/QPolyCreate.cpp, src/qged/plugins/polygon/QPolyCreate.h, src/qged/plugins/polygon/QPolySettings.cpp, src/qged/plugins/polygon/QPolySettings.h, src/qged/plugins/polygon/polygon_tool.cpp` | `QPolySettings.h:35-57; QPolySettings.cpp:145-185,185-200,205-220,225-265; polygon_tool.cpp:29-50,53-80; QPolyCreate.h:40-75,98-106; QPolyCreate.cpp:155-215,225-265,270-315,335-375,410-440,442-455,458-480,485-502,505-545,555-665` | Memory Leaks, Uninitialized Pointers, and NULL Pointer Dereferences | 2 | `CONFIRMED` | `FIXED` | In BRL-CAD qged Batch 69 (QPolyCreate.cpp, QPolyCreate.h, QPolySettings.cpp, QPolySettings.h, polygon_tool.cpp, 1,239 lines): in QPolySettings.h, initialized all pointer member variables to nullptr to eliminate uninitialized pointer access (CWE-457); in QPolySettings.cpp, added explicit QWidget parent to constructor, fixed severe memory leak in uniq_obj_name where ovname and vname were leaked on both collision early exit and success paths (CWE-401), guarded sketch_sync and sketch_name against NULL in sketch_sync_toggled, checked line_snapping and grid_snapping in signal handlers, and guarded p, p->s_i_data, and all UI controls against NULL in settings_sync; in polygon_tool.cpp, stack-allocated QIcon objects in polygon_tool_create and polygon_tool_modify to eliminate heap allocation leaks (CWE-401); in QPolyCreate.h, initialized all pointer member variables to nullptr (CWE-457); in QPolyCreate.cpp, added explicit QWidget parent to constructor, freed pcf in destructor to prevent filter memory leak (CWE-401), guarded qApp, gedp, gedp->dbip, p->s_i_data, and sketch widgets in finalize, guarded qApp, gedp, gedp->ged_gvp, and ps in do_vpoly_copy, guarded qApp, gedp, gedp->dbip, and ps in do_import_sketch, guarded gedp->dbip and sketch controls in sketch_sync to prevent NULL pointer dereferences on uninitialized databases, guarded v->gv_s and scene objects in toggle_line_snapping, toggle_grid_snapping, and checkbox_refresh, and in eventFilter guarded event pointer e, qApp, gedp, pcf, p->s_i_data, and ps settings controls. |
|
||||
| `SEC-0312` | `src/qged/plugins/polygon/QPolyMod.cpp, src/qged/plugins/polygon/QPolyMod.h` | `QPolyMod.h:38-70,105-116; QPolyMod.cpp:35-40,170-174,180-216,218-250,252-285,293-334,336-367,369-408,410-525,528-581,583-608,610-635,670-745,747-814,816-838,840-861,863-895,897-913,915-937,945-1013` | Memory Leaks, Uninitialized Pointers, and NULL Pointer Dereferences | 2 | `CONFIRMED` | `FIXED` | In BRL-CAD qged Batch 70 (QPolyMod.cpp, QPolyMod.h, 1,124 lines): completing all 34 files of src/qged (100% complete): in QPolyMod.h, initialized all pointer member variables to nullptr (ps, mod_names, select_mode, move_mode, update_mode, general_mode_opts, close_general_poly, append_pnt, select_pnt, csg_modes, apply_bool, viewsnap_poly, remove_poly, p, cf, puf, psf, ppf, pmf) to eliminate uninitialized pointer access (CWE-457); in QPolyMod.cpp, added explicit QWidget parent to constructor, freed mouse filter objects puf, psf, ppf, and pmf in destructor to eliminate memory leaks (CWE-401), guarded qApp and mod_names in mod_names_reset, guarded ip and all UI controls in poly_type_settings, guarded qApp, p, p->s_i_data, and ps settings controls in polygon_update_props, guarded qApp and gedp->ged_gvp in toplevel_config, guarded p and p->s_i_data in clear_pnt_selection, guarded qApp, gedp->ged_gvp, and ps in select, guarded p, p->s_i_data, close_general_poly, and boolean operation objects in toggle_closed_poly, guarded qApp, p, p->s_i_data, gedp->ged_gvp, and csg_modes in apply_bool_op, guarded qApp, p, p->s_i_data, and gedp->ged_gvp in align_to_poly, guarded qApp, p, p->s_i_data, and mod_names in delete_poly, guarded gedp->dbip and sketch controls in sketch_name_edit, checked existing sketch collision and guarded gedp->dbip in sketch_name_update, guarded qApp and ps in view_name_edit and view_name_update, guarded v->gv_s in toggle_line_snapping, toggle_grid_snapping, and checkbox_refresh, and in eventFilter guarded event pointer e, qApp, gedp, filters, p->s_i_data, and UI controls. |
|
||||
| `SEC-0313` | `include/qtcad/defines.h, include/qtcad/QgSignalFlags.h, include/qtcad/QgAccordion.h, src/libqtcad/QgAccordion.cpp, include/qtcad/QgAppExecDialog.h, src/libqtcad/QgAppExecDialog.cpp, include/qtcad/QgAttributesModel.h, src/libqtcad/QgAttributesModel.cpp, include/qtcad/QgColorRGB.h, src/libqtcad/QgColorRGB.cpp, include/qtcad/QgDockWidget.h, src/libqtcad/QgDockWidget.cpp, include/qtcad/QgFlowLayout.h, src/libqtcad/QgFlowLayout.cpp` | `defines.h:56-88; QgSignalFlags.h:81-91; QgAccordion.h:40-78; QgAccordion.cpp:30-108; QgAppExecDialog.h:42-62; QgAppExecDialog.cpp:33-101; QgAttributesModel.h:43-70; QgAttributesModel.cpp:33-214; QgColorRGB.h:41-69; QgColorRGB.cpp:30-128; QgDockWidget.h:35-48; QgDockWidget.cpp:21-65; QgFlowLayout.h:74-81; QgFlowLayout.cpp:67-208` | Memory Leaks, Uninitialized Pointers, Off-by-one, Missing Header Guard, and NULL Pointer Dereferences | 2 | `CONFIRMED` | `FIXED` | In BRL-CAD libqtcad Batch 71 (14 files, 1,563 lines): in defines.h, wrapped QTCAD_SLOT and QTCAD_EVENT macro definitions in do-while(0) blocks for safe statement syntax and guarded slot_name and event_name against NULL; in QgSignalFlags.h, added missing #define QGSIGNALFLAGS_H include guard; in QgAccordion.h, made constructors explicit with default nullptr and initialized all pointer members to nullptr; in QgAccordion.cpp, reparented objscrollarea to this, guarded addObject against null pointers and prevented duplicate insertion and redundant signal-slot connections, and guarded against null objects in accordion display loop; in QgAppExecDialog.h, added explicit constructor and destructor declarations and initialized logfile, console, proc, and buttonBox to nullptr; in QgAppExecDialog.cpp, implemented destructor closing and deleting logfile to eliminate persistent memory leaks (CWE-401), deleted logfile on open failure, and guarded proc, console, and buttonBox in read_stdout, read_stderr, process_abort, and process_done to prevent NULL pointer dereferences (CWE-476); in QgAttributesModel.h, modernized constructors and initialized pointers; in QgAttributesModel.cpp, deleted m_root in destructor and prior to allocating a new root in update and do_dbi_update to eliminate severe memory leaks (CWE-401), replaced unsafe bu_avs_remove loop during iteration with canonical bu_avs_free and bu_avs_init_empty, fixed off-by-one error in beginInsertRows (inclusive cnt - 1 bound), guarded against out-of-bounds access in add_Children when color attribute has fewer than 3 components (CWE-125), guarded against NULL strings and nodes, properly nested data updates between beginResetModel and endResetModel, and validated QModelIndex in refresh; in QgColorRGB.h, removed unused dead member d and initialized pointers to nullptr; in QgColorRGB.cpp, reparented child widgets to this, zeroed bu_color structure, used bu_color_from_rgb_chars for direct color synchronization, and guarded against NULL text and button pointers; in QgDockWidget.h, initialized m to nullptr and made constructor explicit; in QgDockWidget.cpp, removed unused map and set headers, guarded event pointer against NULL in event() to prevent crash, and replaced C-style cast with static_cast; in QgFlowLayout.h, initialized spacing members; in QgFlowLayout.cpp, guarded addItem, minimumSize, and doLayout against NULL items, checked widget and style pointers before layoutSpacing to prevent NULL pointer dereference crashes (CWE-476), clamped negative spacing, and returned nullptr in takeAt. |
|
||||
| `SEC-0314` | `include/qtcad/QgKeyVal.h, src/libqtcad/QgKeyVal.cpp, include/qtcad/QgUtil.h, src/libqtcad/QgUtil.cpp, src/libqtcad/bindings.h, src/libqtcad/bindings.cpp, include/qtcad/QgConsoleListener.h, src/libqtcad/QgConsoleListener.cpp, include/qtcad/QgEdit.h` | `QgKeyVal.h:39-102; QgKeyVal.cpp:45-150; QgUtil.h:58-60; QgUtil.cpp:28-148; bindings.h:23-40; bindings.cpp:73-368; QgConsoleListener.h:27-85; QgConsoleListener.cpp:36-91; QgEdit.h:46-113` | Memory Leaks, Division by Zero, Syntax / Declaration Errors, Missing Header Guards, and NULL Pointer Dereferences | 2 | `CONFIRMED` | `FIXED` | In BRL-CAD libqtcad Batch 72 (9 files, 1,422 lines): in QgKeyVal.h, initialized pointer members (m_root, parent) to nullptr, added explicit constructors, and added override specifiers; in QgKeyVal.cpp, initialized m_root to nullptr in model constructor to prevent undefined pointer dereferences (CWE-457), guarded curr_node against NULL in data and setData, ordered model reset correctly by calling beginResetModel before updating m_root in setRootNode, checked row bounds against child count before accessing children in index to prevent out-of-bounds reads (CWE-125), guarded node and parent pointers in parent, rowCount, NodeIndex, and NodeRow to prevent NULL pointer dereferences (CWE-476), and guarded string pointers in add_pair; in QgUtil.h, formatted header guard comment; in QgUtil.cpp, eliminated critical memory leak of bu_attribute_value_set in QgCombType by calling bu_avs_free before returning on all paths (CWE-401), guarded dp and dbip in get_arb_type, db_find_subregion, db_find_region, and QgCombType against NULL pointer dereferences, initialized intern structure with RT_DB_INTERNAL_INIT, replaced bu_bomb in db_find_subregion default case with non-fatal logging to prevent application crash on malformed CSG trees (CWE-755), and guarded comb pointer in db_find_region; in bindings.h, added standard QTCAD_BINDINGS_H header guard; in bindings.cpp, guarded against NULL event pointer in CADkeyPressEvent, CADmousePressEvent, CADmouseReleaseEvent, CADmouseMoveEvent, and CADwheelEvent, checked v->gv_s before accessing axes and ADC draw flags to prevent crash on uninitialized views (CWE-476), and prevented division by zero in CADmouseMoveEvent scaling calculation by clamping v->gv_height to a positive value (CWE-369); in QgConsoleListener.h, added standard QGCONSOLELISTENER_H header guard and initialized process, callback, data, and notifier members to nullptr; in QgConsoleListener.cpp, guarded process, process->gedp, and result string against NULL before checking string length or reading results, prevented unsigned integer underflow (CWE-191) on string length subtraction by verifying s2 > s1, safely disabled and disconnected notifier in destructor, and initialized members in constructor initialization list; in QgEdit.h, resolved syntax errors by adding missing semicolons to class declarations, corrected class name consistency (QgVectEdit), closed unclosed comment, made constructors explicit, and initialized pointer members (vx, vy, vz, dbip) to nullptr. |
|
||||
| `SEC-0315` | `include/qtcad/QgConsole.h, src/libqtcad/QgConsole.cpp, include/qtcad/QgToolPalette.h, src/libqtcad/QgToolPalette.cpp, include/qtcad/QgTreeSelectionModel.h, src/libqtcad/QgTreeSelectionModel.cpp, include/qtcad/QgTreeView.h, src/libqtcad/QgTreeView.cpp` | `QgConsole.h:75; QgConsole.cpp:115-152,202-226,236-248,260-340,434-478,575-580,620-660,685-697,730-785; QgToolPalette.h:71,128-135,142-205; QgToolPalette.cpp:32-52,55-63,89-93,153-295; QgTreeSelectionModel.h:58-60; QgTreeSelectionModel.cpp:38-48,51-105,108-175; QgTreeView.h:53,84-90; QgTreeView.cpp:43-118,175-195,215-223,247-282,305-334,338-368,432-444` | Memory Leaks, Out-of-Bounds Access, Division by Zero, and NULL Pointer Dereferences | 2 | `CONFIRMED` | `FIXED` | In BRL-CAD libqtcad Batch 73 (QgConsole.h, QgConsole.cpp, QgToolPalette.h, QgToolPalette.cpp, QgTreeSelectionModel.h, QgTreeSelectionModel.cpp, QgTreeView.h, QgTreeView.cpp, 2,342 lines): in QgConsole.h, initialized gedp pointer to nullptr; in QgConsole.cpp, eliminated memory leak of ct and av in GEDShellCompleter when gedp or dbip is null (CWE-401), replaced unsafe C-style cast on parent() with qobject_cast, bounded completionModel indexing, fixed out-of-bounds history indexing in consolidateHistory (CWE-125), eliminated dangling pointer read from temporary toLocal8Bit buffer in historyAt using toStdString (CWE-416), guarded Completer popup against NULL in keyPressEvent, selectCompletion, and updateCompleter, added NULL checks on clipboard and mimeData before text extraction, bounded CommandPosition on Key_Up and Key_Down, guarded CommandHistory against empty back() access in commandBuffer, fixed off-by-one word replacement in insertCompletion, prevented listener memory leak in destructor and listen() (CWE-401), and clamped cursor offsets to document bounds in printStringBeforePrompt; in QgToolPalette.h, initialized all pointer and layout members to nullptr; in QgToolPalette.cpp, guarded iicon in QgToolPaletteButton constructor and setter to prevent NULL dereference crashes (CWE-476), guarded controls in QgToolPaletteElement constructor and setter, implemented destructor in QgToolPalette to delete palette elements and prevent memory leaks (CWE-401), eliminated division by zero in button_layout_resize when width is smaller than icon width (CWE-369), fixed typo in setIconWidth where icon_height was assigned to button width, guarded empty elements set in setAlwaysSelected and deleteElement to prevent out-of-bounds / end-iterator dereference crashes (CWE-125/CWE-476), and guarded controls, scrollbars, and buttons in palette_displayElement; in QgTreeSelectionModel.h, initialized treeview to nullptr; in QgTreeSelectionModel.cpp, added NULL pointer checks on treeview, m, gedp, and dbi_state in clear_all and select slots, checked sv[0] bounds, eliminated heap allocation memory leak of QModelIndexList on every selection event by using stack allocation (CWE-401), and guarded snode against NULL before accessing path_hash and path_items (CWE-476); in QgTreeView.h, initialized model and delegate pointers to nullptr; in QgTreeView.cpp, guarded painter and invalid QModelIndex in gObjDelegate::paint, clamped icon height to prevent invalid image scaling, parented draw_action and erase_action to QMenu in context_menu to eliminate action memory leaks on menu deletion (CWE-401), guarded index, cnode, gedp, and view states in do_draw_toggle, guarded against empty path_hashes before back() and pop_back(), guarded m and items in redo_expansions and redo_highlights, and added NULL checks on model m before emitting layoutChanged. |
|
||||
| `SEC-0316` | `include/qtcad/QgView.h, src/libqtcad/QgView.cpp, include/qtcad/QgViewCtrl.h, src/libqtcad/QgViewCtrl.cpp, include/qtcad/QgGL.h, src/libqtcad/QgGL.cpp, include/qtcad/QgSW.h, src/libqtcad/QgSW.cpp, include/qtcad/QgQuadView.h, src/libqtcad/QgQuadView.cpp` | `QgView.h:84,115-120; QgView.cpp:80-95,308-356; QgViewCtrl.h:84-93; QgViewCtrl.cpp:94-147,149-166,168-215; QgGL.h:64-71; QgGL.cpp:74-83,108-114,150-154,249-255,326-346,366-369; QgSW.h:73-81; QgSW.cpp:78-87,88-93,95-185,275-281,350-370,395-407,445-475; QgQuadView.h:105-110; QgQuadView.cpp:61-75,111-125,130-145,163-195,208-316,392-425,436-522` | Memory Leaks, Uninitialized Pointers, Out-of-Bounds Access, and NULL Pointer Dereferences | 2 | `CONFIRMED` | `FIXED` | In BRL-CAD libqtcad Batch 74 (QgView.h, QgView.cpp, QgViewCtrl.h, QgViewCtrl.cpp, QgGL.h, QgGL.cpp, QgSW.h, QgSW.cpp, QgQuadView.h, QgQuadView.cpp, 2,910 lines): in QgView.h, audited clean; in QgView.cpp, replaced return in switch default with break, set canvas_gl and canvas_sw to NULL after deletion in destructor, guarded add_event_filter against NULL, and in clear_event_filter properly updated filters vector and curr_event_filter while ensuring event filters are removed from both GL and SW canvases; in QgViewCtrl.h, initialized QAction pointer members (sca, rot, tra, center, raytrace, fb_mode, fb_clear) to nullptr; in QgViewCtrl.cpp, guarded gedp in fbclear_cmd, fb_mode_cmd, do_view_update, and raytrace_cmd, checked v->gv_s in fb_mode_cmd and do_view_update to prevent NULL pointer dereferences (CWE-476), guarded callback context vctrl in rt_cmd_start and rt_cmd_done, and guarded raytrace before setIcon in raytrace_start and raytrace_done; in QgGL.h, audited clean; in QgGL.cpp, fixed critical memory leak in destructor by calling bv_free on local_v prior to deallocation and corrected struct name in BU_PUT from struct bv to struct bview (CWE-401), set pointers to NULL upon destruction, guarded fb_get_platform_specific return against NULL before dereferencing fbps->data, guarded dm_bg1 and dm_bg2 before dm_set_bg, checked dmp in mouseReleaseEvent before calling dm_set_dirty, guarded v before bv_hash in stash_hashes and diff_hashes, and checked for null QImage in save_image; in QgSW.h, audited clean; in QgSW.cpp, fixed memory leak in destructor by calling bv_free(local_v) and corrected BU_PUT struct name (CWE-401), guarded dmp against NULL in need_update and paintEvent before calling dm_set_dirty, checked width and height bounds before painting and image allocation, guarded fbps return before setup, guarded dm_bg1 and dm_bg2, checked dm_image against NULL in paintEvent and save_image, checked dmp in mouseReleaseEvent, guarded v before bv_hash in stash_hashes and diff_hashes, and guarded dmp and dm_image in save_image and get_viewport_image; in QgQuadView.h, initialized currentView and gedp to nullptr; in QgQuadView.cpp, guarded gedp and view pointers in constructor, createView, changeToSingleFrame, and changeToQuadFrame, clamped index bounds in createView to prevent out-of-bounds reads on VIEW_NAMES array (CWE-125), guarded chained pointers v->gv_s in changeToQuadFrame, guarded view objects in autoview and draw_scene loops, deleted old layout before creating a new one in createLayout to prevent layout leaks and Qt warnings, guarded currentView in view() and do_view_changed, eliminated unsafe parent geometry lookup in get(QPoint) by using widget-local rect and mapFromGlobal, guarded event e in get(QEvent), and guarded quadrant_id and spacer pointers in select. |
|
||||
| `SEC-0317` | `include/qtcad/QgMeasureFilter.h, src/libqtcad/QgMeasureFilter.cpp, include/qtcad/QgPolyFilter.h, src/libqtcad/QgPolyFilter.cpp, include/qtcad/QgSelectFilter.h, src/libqtcad/QgSelectFilter.cpp, include/qtcad/QgSketchFilter.h, src/libqtcad/QgSketchFilter.cpp` | `QgMeasureFilter.h:35-45; QgMeasureFilter.cpp:45-55,80-90,95-105,120-130,135-145,150-165,190-210,240-270; QgPolyFilter.h:35-50,60-70,80-90,100-110; QgPolyFilter.cpp:60-75,100-120,130-150,180-210; QgSelectFilter.h:35-45; QgSelectFilter.cpp:70-85,90-110,130-150,165-190,210-240; QgSketchFilter.h:35-45; QgSketchFilter.cpp:50-70,80-105,120-145,160-205,220-250,270-305,320-350` | Memory Leaks, NaN Domain Errors, Use-After-Free, Division by Zero, and NULL Pointer Dereferences | 2 | `CONFIRMED` | `FIXED` | In BRL-CAD libqtcad Batch 75 (QgMeasureFilter.h, QgMeasureFilter.cpp, QgPolyFilter.h, QgPolyFilter.cpp, QgSelectFilter.h, QgSelectFilter.cpp, QgSketchFilter.h, QgSketchFilter.cpp, 2,899 lines): in QgMeasureFilter.h, declared virtual destructor in QgMeasureFilter; in QgMeasureFilter.cpp, implemented destructor releasing scene object s, fixed critical logic inversion bug in QgMeasureFilter::angle(bool radians) where radians and degrees were swapped, clamped dot product to [-1.0, 1.0] before acos to prevent NaN domain errors, guarded vector unitization against division by zero with ZERO(mag), added null checks on s after bv_obj_get and cleared s = NULL on reset to prevent use-after-free and null dereferences, guarded v in QMeasure2DFilter::get_point, implemented QMeasure3DFilter destructor to clean and free rt_resource, rtip, and application structures eliminating severe memory leaks (CWE-401), cleaned prior raytrace resources before allocating new ones on prep, guarded ray direction magnitude, and cleaned resources on tree loading failure; in QgPolyFilter.h and QgPolyFilter.cpp, added virtual destructors to base QgPolyFilter and derived classes (QPolyCreateFilter, QPolyUpdateFilter, QPolyMoveFilter) to free bu_ptbl containers bool_objs and move_objs eliminating memory leaks (CWE-401), guarded wp, checked contour existence before indexing contour 0, cleared wp->s_i_data = NULL on freeing unclosed polygon, and guarded bv_create_polygon return, wp->s_v, and wp->s_i_data across event handlers; in QgSelectFilter.h and QgSelectFilter.cpp, declared and implemented virtual destructor in QgSelectFilter to free selected_set with bu_ptbl_free (CWE-401), guarded sset and v in closest_obj_bbox and guarded ray direction unitization against division by zero, guarded v and v->gv_s in QgSelectBoxFilter::eventFilter and prevented division by zero when viewport dimensions are zero, removed debug logging spam, and ensured rt_clean_resource is called before destroying rtip and freeing resp/ap on all paths in QgSelectRayFilter; in QgSketchFilter.h and QgSketchFilter.cpp, added virtual destructor to base QgSketchFilter, guarded output parameters and verified sketch magic in screen_to_uv and snap_vertex_uv, guarded v and es against null in all event filters, verified valid ft_set_edit_mode function pointer before invocation, added bounds check on seg_idx against curve count and deg against RT_EDIT_MAXPARA in sketch_seg_sample, bounded all vertex indices against vert_count, guarded arc direction length against zero in sketch_arc_center_uv, bounded curr_seg and full-circle cs->end in QgSketchArcRadiusFilter, guarded event pointer in QgSketchCursorTracker, and safely extracted curr_seg without null dereference in QgSketchSetTangencyFilter. |
|
||||
|
||||
|
||||
|
||||
| `SEC-0318` | `include/qtcad/QgGeomImport.h, include/qtcad/QgModel.h, src/libqtcad/QgGeomImport.cpp, src/libqtcad/QgModel.cpp, src/libqtcad/tests/qgmodel.cpp, src/libqtcad/tests/qgview.cpp, src/libqtcad/tests/qsketch.cpp` | `QgGeomImport.h:51,72-137; QgModel.h:343; QgGeomImport.cpp:27-75,78-153,157-246,325-370; QgModel.cpp:90-140,237-275,362-392,485-508,627-680,789-812,883-1025; tests/qgmodel.cpp:78-135,286; tests/qgview.cpp:63-89; tests/qsketch.cpp:247-276,346,454-490,1939,2027-2120` | Memory Leaks, Uninitialized Pointers, Division by Zero, Model Invariant Violations, and NULL Pointer Dereferences | 2 | `CONFIRMED` | `FIXED` | In BRL-CAD libqtcad Batch 76 (QgGeomImport.h, QgModel.h, QgGeomImport.cpp, QgModel.cpp, tests/qgmodel.cpp, tests/qgview.cpp, tests/qsketch.cpp, 1,323 lines): in QgModel.h, initialized rootItem to NULL to prevent uninitialized pointer dereference (CWE-457); in QgModel.cpp, fixed severe memory leak in destructor by iterating through and deleting all QgItem allocations in items before deleting container, freed empty_gvp, and safely deleted gedp->dbi_state before calling ged_close (CWE-401), deleted existing rootItem and cleared items on g_update reset, guarded mdl, gedp, and dbi_state in QgItem_cmp to prevent SIGSEGV crashes during sorting, added comprehensive null checks in QgItem constructor and path_hash, guarded mdl, gedp, dbi_state, and dp in update callbacks, guarded node and index in NodeRow, canFetchMore, and fetchMore, guarded qi, gedp, dbi_state, and ged_gvp in data(), validated argc and argv in run_cmd, verified sender QAction cast and guarded cnode in draw/erase actions, and added bounds and null checks in item expand/collapse handlers; in QgGeomImport.h and QgGeomImport.cpp, explicitly marked constructors and initialized all pointer members to NULL across ASCImportDialog, RhinoImportDialog, and STEPImportDialog (CWE-457), reparented dialog widgets to this for proper Qt memory ownership, deleted out_win in exec_console_app_in_window to prevent persistent dialog leaks (CWE-401), guarded bu_dir return before QString construction, added null checks on dialog UI controls in options(), and fixed critical logic flaw in gfile() where canceling an import dialog still executed the converter by checking dialog.exec() != QDialog::Accepted; in tests/qgmodel.cpp, tests/qgview.cpp, and tests/qsketch.cpp, guarded path_hashes against empty underflow and validated argc/argv with clean help handling in qgmodel, validated argc/argv with clean help handling and corrected argv[1] model path in qgview, and in qsketch validated argc/argv, added clean db_close on error exit paths, guarded nteeth <= 0 in sketch_create_gear to prevent division by zero (CWE-369), verified dp and dbip in QSketchEditWindow constructor, and guarded vertex/segment arrays and view in table population and screenshot methods. |
|
||||
| `SEC-0319` | `include/tclcad.h, include/tclcad/defines.h, include/tclcad/draw.h, include/tclcad/misc.h, include/tclcad/setup.h, src/libtclcad/tclcad_private.h, src/libtclcad/auto_path.c, src/libtclcad/cmdhist.c, src/libtclcad/command_io.cpp, src/libtclcad/eval.c, src/libtclcad/global.c, src/libtclcad/init.c, src/libtclcad/tests/check_itcl.cpp, src/libtclcad/tests/check_multi_interp.cpp, src/libtclcad/tests/check_tclcad_cmds.cpp` | `include/tclcad/draw.h:178; src/libtclcad/auto_path.c:45-139,201-255; src/libtclcad/cmdhist.c:75-92,94-111,115-184,188-213,217-276,281-302,306-329,333-360,365-401; src/libtclcad/command_io.cpp:48-55,113-132; src/libtclcad/eval.c:33-50,54-66; src/libtclcad/global.c:34-46,49-71,81-87; src/libtclcad/init.c:64-70,72-88,92-97,100-108,110-125,201-209,360-385; tests/check_itcl.cpp:34-45; tests/check_multi_interp.cpp:239-252; tests/check_tclcad_cmds.cpp:36-47` | Stack Out-of-Bounds Read, Memory Leaks, Resource Leaks, Uninitialized Memory, Path Detection Bugs, and NULL Pointer Dereferences | 2 | `CONFIRMED` | `FIXED` | In BRL-CAD libtclcad Batch 77 (include/tclcad.h, include/tclcad/defines.h, include/tclcad/draw.h, include/tclcad/misc.h, include/tclcad/setup.h, tclcad_private.h, auto_path.c, cmdhist.c, command_io.cpp, eval.c, global.c, init.c, tests/check_itcl.cpp, tests/check_multi_interp.cpp, tests/check_tclcad_cmds.cpp, 3,267 lines): in include/tclcad/draw.h, corrected header guard comment from TCLCAD_MISC_H to TCLCAD_DRAW_H; in auto_path.c, fixed critical path detection bugs where ITCL_LIBRARY and ITK_LIBRARY overrides appended filename (itcl.tcl/itk.tcl) and inserted file path instead of directory into auto_path, breaking subsequent file existence checks, fixed itk_set flag never being set to 1, eliminated capturing Tcl error message into paths when tcl_library is unset by replacing unchecked Tcl_Eval with Tcl_GetVar, and added _insert_unique_path helper to deduplicate path entries; in cmdhist.c, fixed severe memory leak of str on all exit paths of tclcad_cmdhist_history (CWE-401), closed fp before error returns to prevent file descriptor leaks, guarded against NULL argv and argv[0], guarded chop and argv[2] in tclcad_cmdhist_add, guarded chop, cho_curr, and BU_LIST boundaries in tclcad_cmdhist_prev/curr/next, guarded chop->cho_curr in cho_cmd before dereferencing, replaced redundant nested BU_LIST_NEXT calls with standard while (BU_LIST_WHILE(...)) dequeue loop in cho_deleteProc, and guarded objects and interp in cho_open/cho_open_tcl; in command_io.cpp, initialized interp to NULL and io_mode to 0 in tclcad_create_io_data eliminating uninitialized struct members (CWE-457), and guarded p->p in tclcad_delete_io_handler to prevent NULL pointer dereference in bu_process_fileno (CWE-476); in eval.c, validated interp and command, guarded args against NULL, and ensured individual argument strings are non-null in tclcad_eval and tclcad_eval_noresult; in global.c, guarded clientData against NULL in tclcad_interp_objects_delete, guarded interp and key in tclcad_interp_objects, and guarded state in tclcad_current_top; in init.c, guarded clientData, interp, and cmds in tclcad_init_state_delete, tclcad_init_state, and tclcad_register_cmds, guarded ctp and ct_func in wrapper_func, guarded filename in tclcad_source_file, verified non-null state in tclcad_init, and fixed critical out-of-bounds stack read (CWE-125) in tclcad_set_argv where !argv caused cast of a single-char stack variable to (const char **) passed into Tcl_Merge, handling empty/non-positive argc cleanly without invalid memory access; in tests/check_itcl.cpp, tests/check_multi_interp.cpp, and tests/check_tclcad_cmds.cpp, validated argv and argv[0] before bu_setprogname/Tcl_FindExecutable and added standard -h/-?/--help usage output with clean exit 0. |
|
||||
| `SEC-0320` | `src/libtclcad/view/view.h, src/libtclcad/view/arrows.c, src/libtclcad/view/autoview.c, src/libtclcad/view/axes.c, src/libtclcad/view/draw.c, src/libtclcad/view/faceplate.c, src/libtclcad/view/labels.c, src/libtclcad/view/lines.c, src/libtclcad/view/refresh.c, src/libtclcad/view/util.c` | `view.h:26-30,141-177; arrows.c:45-66,82-124,198-212,225-242,282-318; autoview.c:37-58,72-91,96-105; axes.c:41-86,181-197,281-394,456-476,492-517,527-537,595-634,699-725,730-750,757-785; draw.c:42-68,71-125,128-212,238-305,330-350,355-368; faceplate.c:43-65,89-100,128-140,167-179,206-218; labels.c:35-51,55-76,92-117,127-137,235-275,290-305,348-378; lines.c:45-78,92-132; refresh.c:37-60,136-140,149-163,165-177,180-190,195-212,220-230,238-265,270-282,285-296; util.c:41-71` | Memory Leaks, Stack Out-of-Bounds Reads, Uninitialized Memory, Missing Include Guards, and NULL Pointer Dereferences | 2 | `CONFIRMED` | `FIXED` | In BRL-CAD libtclcad Batch 78 (view.h, arrows.c, autoview.c, axes.c, draw.c, faceplate.c, labels.c, lines.c, refresh.c, util.c, 2,912 lines): in view.h, added include guards, C++ extern C wrappers, and extern specifier on to_data_lines; in util.c, guarded gdvp, gdvp->dmp, current_top, and current_top->to_interp in to_is_viewable (CWE-476), initialized result_int to 0 (CWE-457), and prevented Tcl_Obj reference count memory leak on evaluation error by restoring and decrementing saved_result before early return (CWE-401); in autoview.c, fixed out-of-bounds argv[1] read in to_autoview by validating argc < 2 || argc > 3 (CWE-125), guarded tvd, tvd->gedp, current_top, and interp in to_autoview_view, and guarded top, top->to_gedp, and views in to_autoview_all_views; in arrows.c, fixed severe memory leak in points parsing where odd point count returned BRLCAD_ERROR without calling Tcl_Free((char *)av) (CWE-401), guarded current_top->to_gedp->u_data before disabling refresh_on, guarded gedp, gdvp, argv, and interp across go_data_arrows, to_data_arrows, and to_data_arrows_func, and added negative bounds validation on line_width, tip_length, and tip_width; in axes.c, guarded to_axes against argc < 3, NULL gedp, gdvp, gasp, and argv[2], validated non-negative values for axes_size, line_width, tick_interval, tick_length, tick_major_length, and ticks_per_major, guarded current_top, gdvp, and interp across go_data_axes and to_data_axes, and guarded gdvp->gv_s in to_model_axes, go_view_axes, and to_view_axes preventing NULL pointer crashes on uninitialized views (CWE-476); in draw.c, guarded hash table, udata, s_fpath, and dbip in key_matches_paths, guarded tvd->gedp, gedp->u_data, gedp->dbip, and sp->s_os in go_draw_solid, guarded gedp, ged_dl, and sp->s_os in go_draw_dlist, checked gdvp->dmp in go_draw, and in to_edit_redraw guarded dbip, ged_dl, verified !BU_LIST_IS_HEAD before dereferencing sp->s_os, and ensured last_gdlp is not head before dequeue and insert; in faceplate.c, guarded gedp, gdvp, and gdvp->gv_s in to_faceplate, and added RGB color range validation [0, 255] across center_dot, prim_labels, view_params, and view_scale; in labels.c, implemented _free_data_labels helper to safely free all allocated label strings and point buffers on Tcl_SplitList parsing failure, eliminating memory leaks on malformed input lists (CWE-401), guarded current_top, gedp, gdvp, and interp in go_data_labels, to_data_labels, and to_data_labels_func, validated non-negative label size, and in to_prim_label guarded current_top, gedp, and argv, prevented negative list size corruption on argc == 0, and safely reset list when argc == 1; in lines.c, guarded current_top, gedp, gdvp, and argv across go_data_lines and to_data_lines; in refresh.c, guarded gedp, gdvp, dbip, gdvp->gv_s, and current_top in go_refresh_draw, eliminated duplicate dm_draw_viewobjs call, guarded gdvp->u_data and dmp in go_refresh, guarded gdvp, top, and views in to_refresh_view and to_refresh_all_views, guarded gedp and current_top in to_refresh, to_refresh_all, and to_refresh_on, and added NULL checks in to_handle_refresh and to_refresh_handler. |
|
||||
| `SEC-0321` | `src/libtclcad/bu.c, src/libtclcad/fbserv.c, src/libtclcad/rt.c, src/libtclcad/tkImgFmtPIX.c, src/libtclcad/wrapper.c` | `bu.c:52-56,97-157,172-205,219-251,257-260,333-350,356-373,380-408,414-420,424-441; fbserv.c:45-50,78-98,103-113,116-145,148-156,158-170,173-188,191-201,260-293,297-308,310-322,347-383; rt.c:80-110,114-159,170-200,204-240,244-267,303-336,345-369,378-402,413-433,444-502,516-583,587-621,631-699,702-707,715-737,741-751,755-778,782-792; tkImgFmtPIX.c:148-170,210-286,308-350; wrapper.c:38-83,103-201,210-215,220-234,250-316,368-408` | Type Confusion, Double Free, Premature Object Deallocation, Memory Leaks, Heap Buffer Underflow, Division by Zero, and NULL Pointer Dereferences | 2 | `CONFIRMED` | `FIXED` | In BRL-CAD libtclcad Batch 79 (bu.c, fbserv.c, rt.c, tkImgFmtPIX.c, wrapper.c, 2,388 lines): in tkImgFmtPIX.c, fixed critical type confusion vulnerability in FileWritePIX where Tcl_Obj * format was passed directly into Tcl_AppendResult (which expects const char * strings), causing illegal pointer dereferences and application crashes (CWE-843), guarded format against NULL in FileReadPIX to prevent NULL pointer dereference in Tcl_GetStringFromObj (CWE-476), checked widthPtr and heightPtr before writing in FileMatchPIX, validated image dimensions and pixelSize in FileWritePIX, added integer overflow protection on fileWidth * pixelSize pitch calculation, bounded srcX and srcY, and matched bu_malloc/bu_free allocation labels; in rt.c, eliminated critical double-free / premature object deallocation bugs in tcl_obj_to_int_array and tcl_obj_to_fastf_array where Tcl_DecrRefCount was erroneously called on list elements returned by Tcl_ListObjGetElements (corrupting Tcl object refcounts and causing use-after-free and crash when lists are accessed or freed, CWE-416/CWE-415), fixed severe memory leaks in tcl_list_to_int_array and tcl_list_to_fastf_array by properly incrementing and decrementing the temporary Tcl_Obj wrapper (CWE-401), eliminated division by zero in tclcad_rt_parse_ray by verifying direction vector magnitude with ZERO() macro before unitizing (CWE-369), guarded against array out-of-bounds reads on xyz in tclcad_rt_pr_cutter, replaced undefined variable rayp with NULL in RT_HIT_NORMAL, replaced sprintf/sscanf/atoi with snprintf/bu_sscanf across all command wrappers, and added comprehensive NULL checks on clientData, interp, and argv; in wrapper.c, fixed heap buffer underflow (CWE-125) in to_more_args_func where trimming an empty first element decremented ac_more to 0, causing avmp[ac_more-1] to access avmp[-1], eliminated memory leaks in to_view_func_common and to_dm_func by allocating av only after argument validation, help checks, and view lookup, guarded gdvp->gv_s and gdvp->dmp before accessing view state and setting perspective, guarded tgd and current_top->to_interp, and replaced bu_vls_addr with bu_vls_cstr; in fbserv.c, guarded clientData, fbslp, fbsp, and string pointers in comm_error and new_client_handler, added index bounds checks (0 <= i/sub < MAX_CLIENTS) in open/close client handlers and Windows IPC handlers, validated port range [0, 65535], and replaced unsafe sprintf with snprintf; in bu.c, guarded ctp and ct_func in lwrapper_func, guarded interp and argv in tcl_bu_get_value_by_keyword, prevented string truncation underflow on short lists, replaced raw sscanf with bu_sscanf in color converters, guarded dirkey in _tclcad_bu_dir_print, checked conv_factor with ZERO() macro in tcl_bu_units_conversion, and replaced all bu_vls_addr calls with bu_vls_cstr. |
|
||||
| `SEC-0322` | `src/libtclcad/bn.c, src/libtclcad/fb.c` | `bn.c:38-42,126-170,185-230,240-275,340-420,440-520,530-580,600-680,690-750,770-850,860-930,940-1010,1020-1090,1100-1170,1180-1250,1260-1374; fb.c:60-95,110-140,165-220,245-290,310-380,410-470,500-560,580-640,660-720,740-800,820-890,900-960,980-1040,1060-1150` | Out-of-Bounds Reads, Memory Leaks, Parameter Swaps, Division by Zero, Integer Overflow / Dimension Guards, and NULL Pointer Dereferences | 2 | `CONFIRMED` | `FIXED` | In BRL-CAD libtclcad Batch 80 (bn.c, fb.c, 2,535 lines): in fb.c, fixed critical out-of-bounds argument vector read in fbo_clear_tcl where argc == 3 erroneously accessed argv[6] instead of argv[2], causing invalid memory reads and segmentation crashes (CWE-125); added integer overflow protection and dimension clamping (<= 32768) in fbo_cell_tcl and fbo_rect_tcl preventing excessive memory allocation and heap buffer overflow (CWE-190/CWE-789); validated rectangle bounds against framebuffer dimensions (xmin + width <= fb_w and ymin + height <= fb_h) in fbo_cell_tcl and fbo_rect_tcl preventing memory corruption outside framebuffer bounds (CWE-125/CWE-787); validated port range (<= 65535) in fbo_listen_tcl and to_listen; corrected return code mapping in fbo_cmd from raw BRLCAD_ERROR to TCL_ERROR; added comprehensive NULL guards on gdvp, tvd, fbop, fbp, interp, gedp, and argv across fbo_coords_ok, fbo_deleteProc, fbo_close_tcl, fbo_clear_tcl, fbo_cursor_tcl, fbo_getcursor_tcl, fbo_refresh_tcl, fbo_listen_tcl, fbo_pixel_tcl, fbo_cell_tcl, fbo_flush_tcl, fbo_getheight_tcl, fbo_getwidth_tcl, fbo_getsize_tcl, fbo_rect_tcl, fbo_configure_tcl, to_fbs_callback, to_close_fbs, to_open_fbs, to_set_fb_mode, and to_listen; replaced unsafe sscanf with bu_sscanf and bu_vls_addr with bu_vls_cstr; in bn.c, fixed swapped parameter bug in tclcad_bn_eigen2x2 where matrix element b was parsed into c and c into b; prevented division by zero in tclcad_bn_mat_lookat by verifying hypot_xy with ZERO() macro before passing to bn_mat_lookat (CWE-369); corrected broken logic in bn_cmd_noise_slice which misread argv indices, discarded loop computations, and fell through to invalid noise types, replacing it with proper index reading, dimension validation (<= 4096), and returning the formatted noise list; fixed memory leak in tclcad_bn_mat_arb_rot on double conversion failure by routing to error label (CWE-401); added missing error messages on bn_decode_vect failures in vector functions; replaced unsafe atof with Tcl_GetDouble in bn_cmd_noise_perlin and bn_cmd_noise; replaced sscanf with bu_sscanf; guarded snprintf buffer sizes; and added comprehensive NULL checks on interp, argv, and clientData across all 35 math command wrappers. |
|
||||
| `SEC-0323` | `src/libtclcad/polygons.c, src/libtclcad/dm.c` | `polygons.c:45-80,110-180,210-260,310-360,480-530,620-680,810-860,1020-1080,1210-1260,1350-1410,1520-1580,1710-1760; dm.c:140-205,210-240,260-355,380-415,430-485,510-575,600-645,670-800,830-870,900-925,970-1015,1020-1050,1055-1077,1080-1110,1120-1155,1160-1190,1205-1255,1280-1335,1340-1375,1390-1455,1470-1520,1535-1580,1590-1640,1655-1680,1695-1730,1745-1785,1790-1835,1840-1890,1900-1940,1950-2020,2030-2070,2080-2110,2140-2180,2190-2225,2235-2270,2280-2335,2350-2375,2410-2430,2440-2460,2480-2525,2530-2575,2600-2660,2695-2850,2865-2900,2905-2935,2940-2955,3035-3045` | Use-After-Free, Memory Leaks, Buffer Underflow / Out-of-Bounds Reads, Wrong Argument Indexing, Port Range Validation, and NULL Pointer Dereferences | 2 | `CONFIRMED` | `FIXED` | In BRL-CAD libtclcad Batch 81 (polygons.c and dm.c, 4,781 lines): in dm.c, fixed critical use-after-free vulnerability in fb_cmd_common_file_size where dynamic string zerr was passed to Tcl_SetResult with TCL_STATIC and immediately freed with bu_free, leaving Tcl pointing to freed heap memory (CWE-416); fixed critical out-of-bounds argument vector read in dmo_logfile_tcl where argc == 3 erroneously accessed argv[3] instead of argv[2] (CWE-125); guarded out-of-bounds vector reads in error and help handlers across 28 display manager command callbacks; guarded vector index decodes in dmo_parseAxesArgs, dmo_parseDataAxesArgs, and dmo_parseModelAxesArgs; added port range validation (<= 65535) in dmo_listen_tcl; mapped return codes in dmo_cmd from BRLCAD_OK to TCL_OK/TCL_ERROR; replaced sprintf with snprintf; replaced raw atof/atoi with sscanf/bu_sscanf; replaced all bu_vls_addr calls with bu_vls_cstr; added comprehensive NULL checks on dmop, interp, dmo_dmp, and dmo_dmp->i across all 38 display manager routines; in polygons.c, implemented _free_partial_poly and _free_partial_polygon_state cleanup helpers to eliminate severe memory leaks on parse/split failures (CWE-401); freed contour_av on replace_poly success; freed allocated bg_polygon in import; fixed off-by-one out-of-bounds indexing in target_poly (CWE-125); prevented size_t underflow in clip when num_polygons == 0 and state corruption when num_polygons < 2; checked bg_clip_polygon result for NULL; guarded gdvp->dmp, current_top->to_gedp->u_data, current_top->to_interp, and gv_s across all polygon commands; and replaced bu_vls_addr with bu_vls_cstr. |
|
||||
| `SEC-0324` | `src/libtclcad/mouse.c` | `mouse.c:60-70,85-95,110-120,230-310,320-380,395-440,455-500,530-610,630-655,700-725,770-795,840-865,910-935,970-1040,1050-1120,1130-1170,1260-1360,1380-1490,1510-1590,1660-1730,1740-1840,1890-1980,2000-2080,2100-2215,2250-2275,2285-2310,2320-2390,2400-2425,2435-2460,2475-2530,2540-2565,2575-2600,2615-2715,2730-2755,2765-2790,2805-2890,2995-3050,3060-3135,3150-3225,3255-3315,3325-3400,3415-3450,3470-3550,3560-3645,3660-3740,3750-3830` | Memory Leaks, Uncomputed Model Coordinates Logic Bug, Buffer Overflow / Missing NULL-terminator, Division by Zero, Uninitialized Pointers, and NULL Pointer Dereferences | 2 | `CONFIRMED` | `FIXED` | In BRL-CAD libtclcad Batch 82 (mouse.c, 3,594 lines): fixed critical logic bug in to_mouse_otranslate where model point was declared with VINIT_ZERO and never transformed by the inverse rotation matrix before printing into tran_x_vls, tran_y_vls, tran_z_vls and passing to ged_exec_otranslate (which caused all mouse translations to pass 0, 0, 0); eliminated persistent memory leaks of brep_name and bindings bu_vls on failure paths in to_mouse_brep_selection_append and to_mouse_brep_selection_translate (CWE-401); eliminated memory leaks of joint_name and bindings bu_vls on failure paths in to_mouse_joint_select and to_mouse_joint_selection_translate (CWE-401); fixed buffer allocation and missing NULL terminator in to_mouse_move_bot_pnts where allocating ac elements resulted in av[ac-1] being overwritten by the loop and leaving no NULL termination (CWE-125/CWE-787), allocating ac + 1 and properly terminating; fixed uninitialized gedp->ged_gvp pointer dereference and wrong view rotation matrix inversion in to_mouse_brep_selection_append, to_mouse_joint_select, to_mouse_poly_circ_func, to_mouse_poly_ell_func, to_mouse_poly_rect_func, and to_data_scale (CWE-476); prevented division by zero across to_mouse_constrain_trans, to_mouse_move_arb_edge, to_mouse_move_arb_face, to_mouse_move_bot_pnt, to_mouse_move_bot_pnts, to_mouse_move_pnt_common, to_mouse_oscale, to_mouse_otranslate, TO_COMMON_MOUSE_SCALE, to_mouse_pscale, to_mouse_ptranslate, and to_mouse_trans by clamping width <= 0 to 1 before calculating inv_width (CWE-369); corrected error messages in to_mouse_constrain_rot and to_mouse_constrain_trans on invalid axis; guarded wdbp returned from wdb_dbopen in to_mouse_move_bot_pnt; guarded gdvp->dmp in to_mouse_rect before calling dm_get_height; guarded current_top, current_top->to_interp, current_top->to_gedp, and u_data across all callback executions and polygon functions; and modernized all (~38) bu_vls_addr calls to bu_vls_cstr. |
|
||||
| `SEC-0325` | `src/libtclcad/commands.c` | `commands.c:30-40,85-115,140-155,170-195,250-280,310-330,340-360,540-565,650-675,700-725,830-860,1110-1135,1190-1225,1245-1270,1315-1340,1400-1425,1460-1490,1540-1580,1650-1685,1770-1815,1900-1940,2010-2050,2130-2165,2215-2240,2290-2340,2460-2495,2570-2640,2680-2715,2760-2830,2870-2900,3110-3160,3320-3360,3410-3445,3550-3580,3690-3740,3810-3840,3920-3950,4040-4075,4160-4190,4280-4320,4410-4445,4550-4585,4670-4710,4800-4840,4950-5030,5040-5140,5170-5240,5260-5300,5320-5360,5370-5385,5390-5415,5430-5450,5480-5525,5540-5585,5600-5645,5660-5705,5750-5795,5810-5845,5860-5895,5910-5940,5960-6010,6020-6045,6050-6075,6090-6130,6145-6180,6195-6225,6235-6285,6295-6340,6350-6390,6400-6450,6460-6545,6555-6600,6610-6655,6665-6700,6705-6715,6720-6730,6735-6750,6755-6765,6770-6840` | Inverted Logic / Crasher, Resource Leaks, Buffer Overflow / Unchecked sprintf, Division by Zero, Type Confusion, Memory Leaks, and NULL Pointer Dereferences | 2 | `CONFIRMED` | `FIXED` | In BRL-CAD libtclcad Batch 83 (commands.c, 6,748 lines): completing all 31 files of src/libtclcad (100% complete): fixed critical inverted logic bug in to_pix where dm_make_current returning BRLCAD_OK (0) was treated as failure via !make_ret and aborted; fixed persistent resource leaks of PNG write structures in to_png on error and exit paths by properly invoking png_destroy_write_struct; fixed memory leak of callback_cmd bu_vls in to_rt_end_callback_internal; fixed severe buffer overflow vulnerability and memory leak in to_dplot where fixed stack buffer av[256] lacked bounds check on split list length, had an off-by-one indexing error on NULL terminator, and leaked memory on Tcl_Eval failure; fixed type confusion bug in free_path_edit_params by using correct struct dm_path_edit_params; fixed division-by-zero vulnerabilities in to_bounds, to_data_move_func, to_data_pick_func, to_view2screen, and to_vslew by validating clip boundaries and clamping non-positive width/height before computing scale factors and aspect ratios; prevented negative array indexing in to_make, to_mirror, to_bot_edge_split, and to_bot_face_split by enforcing argument count bounds; preserved ged_exec command output in to_bot_edge_split and to_bot_face_split before invoking redraw; replaced unchecked sprintf with snprintf in to_vmake; added NULL pointer guards across all commands validating gedp, gdvp, dmp, dbip, current_top, to_gedp, and to_interp; and modernized all (~60) bu_vls_addr calls to bu_vls_cstr. |
|
||||
| `SEC-0326` | `src/libicv/asciiart.cpp, src/libicv/bw.c, src/libicv/color_space.c, src/libicv/crop.c, src/libicv/dpix.c, src/libicv/encoding.c, src/libicv/icv_private.h, src/libicv/operations.c, src/libicv/pix.c, src/libicv/ppm.c, src/libicv/stat.c` | `asciiart.cpp:34-51; bw.c:33-100,104-177,180-215; color_space.c:38-78,81-194; crop.c:41-86,98-167; dpix.c:63-108,112-161,165-204,207-237,240-275; encoding.c:33-51,55-115; icv_private.h:20-30; operations.c:40-59,61-81,83-102,104-126,128-148,150-179,181-210,212-241,244-273,275-314,316-385; pix.c:34-67,70-100,103-167,170-211; ppm.c:36-78,81-144,147-196,214-226,228-291; stat.c:31-45,49-74,78-102,106-129,133-148,152-176,180-209,213-242,246-277,281-297` | Division by Zero, Premature Dereference / NULL Pointer Crashes, Integer Overflow on Dimensions & Buffers, Out-of-Bounds Reads, and Unhandled Floating-Point NaNs | 2 | `CONFIRMED` | `FIXED` | In BRL-CAD libicv Batch 84 (asciiart.cpp, bw.c, color_space.c, crop.c, dpix.c, encoding.c, icv_private.h, operations.c, pix.c, ppm.c, stat.c, 2,400 lines): in stat.c, fixed critical premature NULL dereference in icv_hist where img->width and img->data were accessed prior to the ICV_IMAGE_VAL_PTR(img) check (CWE-476); eliminated multiple division-by-zero vulnerabilities in icv_mean, icv_var, and icv_skew when image width/height are zero (CWE-369); guarded against NULL bins, zero n_bins, and zero channels across all statistical routines; prevented out-of-bounds reads and NaN propagation in icv_max, icv_min, and icv_sum; in operations.c, fixed premature NULL dereference in icv_add_val by checking ICV_IMAGE_VAL_INT before accessing img->data; prevented division-by-zero crashes in icv_divide_val and icv_divide; fixed multi-channel desynchronization / out-of-bounds corruption in icv_saturate by advancing by img->channels instead of hardcoded 3; guarded img dimensions and scale factors against division by zero in icv_fit; in crop.c, fixed division-by-zero crash in icv_crop when img->channels is zero; added integer overflow checks on row byte calculations in icv_crop_rect and icv_crop (CWE-190); in color_space.c, guarded against out-of-bounds reads in icv_rgb2gray when channels < 3 (CWE-125); added integer overflow protection on dimensions and buffer allocations in icv_gray2rgb and icv_rgb2gray; in encoding.c, guarded against NULL data and integer overflows in icv_uchar2double and icv_data2uchar, and prevented division-by-zero and domain errors on negative or zero gamma; in dpix.c, safely handled NaNs/Infs during normalization to prevent divide-by-zero and infinite loops, replaced raw POSIX read/write with stdio fread/fwrite to eliminate short-read and buffering bugs, and added integer overflow validation on sample counts; in pix.c and bw.c, guarded against NULL data conversion pointers, checked dimensions against size_t overflow, eliminated truncation from int casts, and checked realloc limits on stream reads; in ppm.c, clamped RGB float values before lrint to avoid undefined integer conversions, replaced sprintf with snprintf for PPM headers (CWE-120), guarded against numeric overflow in parse_ppm_int, and validated buffer limits in ppm_read_mem; in asciiart.cpp, validated image pointer, data, channels, dimensions, and brightness multiplier; and in icv_private.h, properly positioned include guards. |
|
||||
| `SEC-0327` | `src/libicv/fileformat.c, src/libicv/filter.c, src/libicv/jpeg.c, src/libicv/pixcii.hpp, src/libicv/rot.c, src/libicv/size.c` | `fileformat.c:179,211,273-286,341,380-401,407-427,647-653,683-690; filter.c:38-40,133-135,322-345,385-405,455-480; jpeg.c:54-55,80-84,117-120,141-145,171-177,212-215,238-241,250-255,263-268,284-289,310-313,332-337,358-363,383-386; pixcii.hpp:78-96,125-157,162-171; rot.c:98-115,130-136,150-153,292-295,355-385,392; size.c:181-190,220-247,309-354,368-395,401-411` | Division by Zero, Resource & Memory Leaks, NULL Pointer Dereference, Setjmp/Longjmp Undefined Behavior, Integer Overflow on Dimensions & Buffers, and Out-of-Bounds Access | 2 | `CONFIRMED` | `FIXED` | In BRL-CAD libicv Batch 85 (fileformat.c, filter.c, jpeg.c, pixcii.hpp, rot.c, size.c, 2,925 lines): in fileformat.c, fixed memory leak of ofilename on validation failure and fopen error paths in icv_write (CWE-401); prevented closing stdin on unsupported format; guarded against NULL bif->data, 0 width/height/channels, and integer overflows in icv_write, icv_write_mem, icv_writeline, and icv_writepixel; added NULL data check in icv_zero and invalidated magic in icv_destroy to prevent use-after-free; in jpeg.c, declared setjmp-lived pointers volatile to eliminate undefined behavior across longjmp; checked icv_data2uchar return values against NULL before scanline processing; eliminated memory leak of libjpeg buffer mem_buf on write failure; guarded dimensions against 0/invalid sizes and checked double-converted buffer allocations in jpeg_read and jpeg_read_mem; in rot.c, guarded argc/argv before calling bu_setprogname; validated pixel size, square size, and width/height options with strtol; set stdout to binary mode for piping binary image streams on Windows; added integer overflow checks on scanline bytes and buffer allocations in arbrot and icv_rot; hardened arbrot coordinates to size_t; supported negative rotation angles via !ZERO(angle); in size.c, guarded icv_image_size against NULL widthp/heightp and zero unit conversions; guarded shrink_image and under_sample against NULL image data, 0 channels, and integer overflows on realloc; removed truncating int casts on dimensions; prevented division by zero in resize_output_valid; in filter.c, validated kernel and offset pointers in get_kernel and get_kernel3; guarded icv_filter, icv_filter3, and icv_fade against NULL data, 0 channels/dimensions, NaN fraction multipliers, and integer overflows; and in pixcii.hpp, guarded against empty ascii character maps, handled NaN brightness boosts, converted signed int pixel indexing to size_t with overflow guards, and clamped double pixel color values safely. |
|
||||
| `SEC-0328` | `src/libicv/PImgHash.cpp, src/libicv/PImgHash.h, src/libicv/diff.cpp, src/libicv/diff_approx.cpp, src/libicv/png.cpp` | `PImgHash.cpp:51-57,134-137,216-224,241-255,265-285; PImgHash.h:66,81,87,130,145,151,164-190,224-239,287-325; diff.cpp:177-185,193,210-215,320-333,358-370,408-445,459-482,492,525; diff_approx.cpp:51-70,75-81,135-146,176-177,217; png.cpp:198-203,219,228-232,287-302,320-324,346-350,392,459-468,523-529,548,563,586-590,668-675,685` | Division by Zero, Setjmp/Longjmp Undefined Behavior, Resource & Memory Leaks, Buffer Bounds & Out-of-Bounds Reads, Integer Overflow on Dimensions & Buffers, and Undefined Float-to-Int Conversions | 2 | `CONFIRMED` | `FIXED` | In BRL-CAD libicv Batch 86 (PImgHash.cpp, PImgHash.h, diff.cpp, diff_approx.cpp, png.cpp, 2,233 lines): in png.cpp, validated bif pointer, bif->data, dimensions, and channels in png_write and png_write_mem; declared setjmp-spanning local pointers volatile to prevent undefined behavior across longjmp (CWE-398); eliminated memory leak of converted pixel buffer data on write errors and used icv_destroy in setjmp handlers to prevent leaks of bif->render_info (CWE-401); prevented integer overflow in user_read_data bounds calculation (CWE-190); validated rowbytes against width * 3 in png_read to prevent heap out-of-bounds writes (CWE-122); validated rowbytes and buffer allocations in png_read and png_read_mem; in diff.cpp, guarded write_nirt_shots_for_ri against division by zero on aspect, width, height, and viewsize (CWE-369); guarded icv_diff_nirt_shots against NULL data, mismatched channel counts (< 3), and buffer allocation overflow; prevented heap out-of-bounds reads in icv_diff by indexing per-image channel counts instead of hardcoded 3 and guarded against signed integer overflow on off_by_many; validated 3-channel input, integer overflow on dimensions, and clean buffer freeing in icv_diffimg; in diff_approx.cpp, made load_icv static, guarded against NULL data, unsigned underflow when rows == 0, and integer overflow; validated image pointers and dimensions in pdiff_dct; guarded ssim_calc against NULL data, zero dimensions/channels, and sanitized non-finite NaN/Inf pixel values; in PImgHash.cpp and PImgHash.h, clamped float pixel values to [0.0, 1.0] with NaN check in convert_pix to prevent undefined float-to-int cast conversions (CWE-190/CWE-681); guarded DCTHasher::apply against zero dimensions; prevented out-of-bounds vector writes in tile_size when b == 0 or j >= b; guarded Preprocess::start and Preprocess::stop against division by zero and out-of-bounds histogram access; prevented NULL pointer dereferences and integer overflows in Image class; and guarded resize_row, resize, and add_row against division by zero on tile size. |
|
||||
| `SEC-0329` | `src/libicv/anim.cpp, src/libicv/apngmini.hpp, src/libicv/rle.cpp, src/libicv/rle.hpp` | `anim.cpp:115-155,238-265,286-290,320-341,446-494,519-523,539-550,589-638; apngmini.hpp:539-548,577-612,647-650,700-705,760-766,775-790,1060-1085,1122-1135,1152-1158,1322-1335,1346-1350,1423-1433; rle.cpp:42-47,222-230,246-254,277-289,301-309,327-338; rle.hpp:235-245,941-965,983-990,1015-1020,1050-1055,1096-1100,1133-1138` | Integer Overflow on Dimensions & Buffers, Unsigned Underflow, Heap Buffer Overflows & Overreads, CPU Exhaustion DoS, Undefined Float Conversions, and NULL Pointer Dereferences | 2 | `CONFIRMED` | `FIXED` | In BRL-CAD libicv Batch 87 (anim.cpp, apngmini.hpp, rle.cpp, rle.hpp, 3,778 lines): in anim.cpp, validated bif pointer, bif->data, dimensions, and channels in icv_to_apng preventing heap out-of-bounds reads on unexpected channel layouts (CWE-125); clamped float pixel values in float_to_u8 with std::isfinite check to prevent undefined float-to-uint8 cast conversions (CWE-190/CWE-681); guarded read_mjpeg_avi against chunk size underflow and unbounded memory allocation (CWE-191/CWE-400); guarded write_mjpeg_avi against 32-bit integer arithmetic overflows on data rate, frame bytes, and index blocks; validated image pointers and non-empty dimensions across icv_anim_write, icv_anim_add_frame, icv_anim_insert_frame, icv_anim_replace_frame, and icv_anim_get_frame; in apngmini.hpp, enforced maximum pixel limits, non-zero dimensions, and rowbytes buffer bounds in LibpngBackend decode/encode routines; guarded write_chunk against size_t overflow; ensured valid pixel bounds and buffer sizes before cropping and over-compositing; eliminated unsigned underflow and heap buffer corruption during background disposal in Animation::compose when frame.x_offset >= canvas_width (CWE-191/CWE-122); guarded chunk peeking against integer overflow and enforced minimum 4-byte length on fdAT chunks; capped maximum file read size to 512MB in read_file; in rle.cpp, sanitized double-to-uint8 conversions in dbl_to_u8 against non-finite NaN/Inf values; validated image data and dimensions in rle_write and rle_write_mem; guarded memory stream buffer allocation; in rle.hpp, implemented a per-row opcode counter in Decoder::read to prevent CPU exhaustion DoS attacks (CWE-400); clamped scanline and pixel skips to image boundaries to prevent unsigned integer wrap-around and out-of-bounds buffer writes (CWE-122/CWE-190); validated image buffer capacity before colormap transformations; ensured non-null buffer and positive dimensions in write_rgb; and prevented integer overflow in MemReadStream::tell. |
|
||||
| `SEC-0330` | `src/libicv/tests/apngmini.cpp, src/libicv/tests/demo.c, src/libicv/tests/fileformat.c, src/libicv/tests/icv_diff_test.c, src/libicv/tests/icv_png_json_test.cpp, src/libicv/tests/pimghash.cpp, src/libicv/tests/rle.cpp, src/libicv/tests/robustness.c` | `apngmini.cpp:45-55,83-93,138-144,157-165; demo.c:49-75,104-106,120-122,153-163,187-195,220-235,240-252; fileformat.c:48-58,92-95,151-155; icv_diff_test.c:63-75,85-93,112-118,137-145,238-245,304-320,333-339,392-405,486-499,532-550,572-576; icv_png_json_test.cpp:94-105,131-185,204-208,319-323,412-416,462-466; pimghash.cpp:48-52,222-232,235-240; rle.cpp:104-125,134-138,187-210,686-695,738-745,760-770,1605-1610; robustness.c:60-148,654-690,1111-1185,1211-1220,1339-1342` | Memory Management Mismatch, Unchecked Vector & Buffer Bounds, Temporary File Leaks, Unbounded Allocation & Integer Overflows, Division by Zero, and NULL Pointer Dereferences | 2 | `CONFIRMED` | `FIXED` | In BRL-CAD libicv Batch 88 (tests/apngmini.cpp, tests/demo.c, tests/fileformat.c, tests/icv_diff_test.c, tests/icv_png_json_test.cpp, tests/pimghash.cpp, tests/rle.cpp, tests/robustness.c, 4,882 lines, completing src/libicv to 100%): in rle.cpp, resolved allocator mismatch (CWE-762) by changing create_test_image from libc calloc to bu_calloc to match bu_free in free_test_image; guarded against arithmetic overflow in image data size calculation; added null data checks in pixels_match; ensured temporary test files in rle_roundtrip, test_write_invalid_channels, and test_write_oversized_dimensions are deleted on error and completion; and exercised null file stream handling in test_invalid_file; in apngmini.cpp, validated frame dimensions in make_frame to prevent integer overflow and excessive allocation; verified vector bounds before indexing composed frame pixels to prevent out-of-bounds reads (CWE-125); and ensured roundtrip temporary files are deleted via RAII cleanup; in demo.c, validated image creation and buffer allocations in demo_rgb and prevented division by zero when dimensions sum to zero; guarded against dimension overflow and null pointers in clone_image; added null checks across demo_memory_io, demo_file_io, demo_crop_filter_ascii, and demo_diffs; and ensured temporary animation test files are cleaned up unconditionally; in fileformat.c, validated image data allocation in make_pixel and guarded path parameter in write_auto_pix; in icv_diff_test.c, validated dimensions and arithmetic overflow in make_solid; added null data checks in test_icv_diff_counts and test_icv_diffimg_colors; and validated render_info pointers before dereferencing in test_png_metadata_roundtrip, test_diff_render_info, and test_nirt_shots; in icv_png_json_test.cpp, validated dimensions and data pointers in make_solid; capped maximum file read size to 100MB in png_read_text_chunk; guarded chunk parsing against 32-bit integer overflow; and verified render_info allocations before dereferencing; in pimghash.cpp, sanitized floating-point comparisons with std::isfinite in nearly_equal; and checked vector size before indexing hash bytes in test_hashing; in robustness.c, validated dimensions and memory allocations across all make_* helper functions; prevented division by zero in make_unit_rgb; checked statistics pointers (minv, maxv, sumv, meanv, bins, mode, median, var, skew) for null before access in test_crop_filters_and_stats; and guarded metadata and frame allocations in test_ascii_render_info_and_diff and test_animation_frame_management; and across all test harnesses, safely validated argc > 0 && argv && argv[0] before calling bu_setprogname. |
|
||||
| `SEC-0331` | `src/libnmg/bool.c, src/libnmg/ck.c` | `bool.c:165-215,220-245,260-290,440-475,540-580,660-685,730-845,860-930; ck.c:60-700,708-735,740-755,760-833,870-882,885-905,908-940,976-994,1008-1028,1031-1082,1104-1149,1159-1205,1217-1244,1285-1339,1357-1375,1394-1493,1506-1540,1551-1563,1577-1627,1643-1678,1682-1710` | Buffer Overlapping Undefined Behavior, Stack & Heap Buffer Truncation / Overflow, Division by Zero, Unsigned Integer Underflow, Memory Leaks, Dangling / Unchecked Pointers, and NULL Pointer Dereferences | 2 | `CONFIRMED` | `FIXED` | In BRL-CAD libnmg Batch 89 (bool.c, ck.c, 2,801 lines): in ck.c, resolved critical undefined behavior (UB) and buffer corruption across all topological consistency check routines (nmg_ck_e, nmg_ck_vu, nmg_ck_eu, nmg_ck_lg, nmg_ck_l, nmg_ck_lu, nmg_ck_fg, nmg_ck_f, nmg_ck_fu) by replacing unsafe fixed-length heap allocations and overlapping snprintf calls (where the destination buffer was also passed as the %s source argument) with dynamically sized struct bu_vls formatting; fixed CWE-369 division-by-zero vulnerability in nmg_ck_eg_verts by guarding edge direction magnitude against zero before calling VUNITIZE; eliminated NULL pointer dereferences when logging or checking without parent strings by guarding string pointers; in nmg_ck_lueu, fixed backward/forward edge logging mismatch bug, corrected routine name typo in logs, and guarded circular list navigation against empty list heads; hardened all 17 nmg_v* validator routines (nmg_vvg, nmg_vvertex, nmg_vvua, nmg_vvu, nmg_veg, nmg_vedge, nmg_veu, nmg_vlg, nmg_vloop, nmg_vlu, nmg_vfg, nmg_vface, nmg_vfu, nmg_vsshell, nmg_vshell, nmg_vregion, nmg_vmodel) with comprehensive NULL checks, magic identification guards, and coordinate validation; in nmg_eu_2s_orient_bad, guarded radial and mate pointers during circular traversal; in nmg_ck_closed_surf and nmg_ck_closed_region, checked pointer validity before recursive verification; in nmg_ck_v_in_2fus and nmg_ck_vs_in_region, ensured vertex geometry and model pointers are valid and sanitized visited array allocation against negative or zero maxindex; in bool.c, guarded nmg_plot_open_edges against NULL magic, checked vertex coordinate pointers, and ensured plot_file_name bu_vls is unconditionally freed at exit; validated model and shell pointers in nmg_has_dangling_faces; eliminated unsigned integer underflow vulnerability in nmg_kill_anti_loops during loop deletion; safely bounded buffer formatting in nmg_show_each_loop; guarded edgeuse mate pointers in nmg_classify_shared_edges_verts; removed obsolete #if 0 dead code block; ensured bounding boxes exist before disjoint tests in nmg_bool; and guarded model maxindex against non-positive sizes before calloc/memcpy in boolean evaluation. |
|
||||
| `SEC-0332` | `src/libnmg/class.c, src/libnmg/copy.c` | `class.c:337-343,366-390,485-584,588-592,648-656,860-935,1292-1410,1546-1570,1630-1725,1780-1825,2032-2135,2345-2440; copy.c:38-51,54-72,77-107,110-130,132-192,195-247,250-278,280-320,323-355,357-390,393-425,427-447,449-479,482-566,574-590,593-614,617-680,682-727,729-745,748-815,821-869` | Off-by-One Heap Buffer Overflows, Union Type Confusion, Division by Zero, Broken Radial Circular Loops, Dead Code Blocks, and NULL Pointer Dereferences | 2 | `CONFIRMED` | `FIXED` | In BRL-CAD libnmg Batch 90 (class.c, copy.c, 3,392 lines): in copy.c, resolved critical off-by-one heap buffer overflow in nmg_clone_model by allocating maxelem = original->maxindex > 0 ? (size_t)original->maxindex + 1 : 1 instead of original->maxindex, preventing out-of-bounds writes and corruptions when elements with index == maxindex are cloned; introduced safe index-checked structArray accessor helpers get_struct and set_struct validating index >= 0 && (size_t)index < maxelem; fixed union type confusion in nmg_construct_face where case NMG_FACE_G_SNURB_MAGIC accessed original->g.plane_p->index instead of original->g.snurb_p->index; hardened all 20 structure constructors (nmg_construct_region_a, nmg_construct_region, nmg_construct_face_g_plane, nmg_construct_face_g_snurb, nmg_construct_face, nmg_construct_vertex_g, nmg_construct_vertex, nmg_construct_vertexuse_a_plane, nmg_construct_vertexuse_a_cnurb, nmg_construct_vertexuse, nmg_construct_edge, nmg_construct_edge_g_lseg, nmg_construct_edge_g_cnurb, nmg_construct_edgeuse, nmg_construct_loop_a, nmg_construct_loop, nmg_construct_loopuse, nmg_construct_faceuse, nmg_construct_shell_a, nmg_construct_shell) with input NULL checks, safe structArray index bounds validation, and non-null child insertion guards; validated knot vector sizes (u.k_size, v.k_size, k_size) and ctl_points array allocations before copying in SNURB and CNURB constructors; removed dead unused tolerance variable in nmg_clone_model; in class.c, fixed CWE-369 division-by-zero vulnerability in nmg_class_pnt_e by checking MAGSQ(ptvec) < SMALL_FASTF before calling VUNITIZE; eliminated off-by-one heap underallocations in nmg_class_pnt_e debug plot bits buffer, nmg_class_pnt_s faces_seen array, and class_lu_vs_s b buffer by allocating (size_t)maxindex + 1; replaced unsafe sprintf calls with snprintf across debug plot generators; deleted two large obsolete #if 0 dead code blocks (~200 lines: nmg_class_lu_fu and nmg_get_interior_pnt); guarded against NULL shell attributes (s->sa_p) before bounding box dereferences in nmg_class_pnt_s, class_eu_vs_s, and nmg_classify_s_vs_s by ensuring attributes via nmg_shell_a; hardened radial and mate pointer cycles against NULL dereference and infinite loops in class_eu_vs_s, class_shared_lu, and class_lu_vs_s; and prevented crashes and type confusion on empty or vertex loops in class_shared_lu and nmg_classify_s_vs_s by validating list emptiness, checking child magic, and ensuring vertex geometry pointers are non-null. |
|
||||
| `SEC-0333` | `src/libnmg/eval.c, src/libnmg/extrude.c` | `eval.c:43-52,89-125,203-275,282-355,435-460,505-525,535-555,568-605,608-625,630-660; extrude.c:45-68,75-84,90-170,180-255,263-289,298-388,505-778,827-918,930-1090,1148-1328,1347-1524` | Heap Buffer Overflows / OOB Writes, Memory Leaks, Copy-Paste Edge Intersection Defects, Denial of Service / Aborts, and NULL Pointer Dereferences | 2 | `CONFIRMED` | `FIXED` | In BRL-CAD libnmg Batch 91 (eval.c, extrude.c, 2,024 lines): in extrude.c, resolved critical Cat 1 heap buffer overflow / OOB write vulnerabilities (CWE-122 / CWE-787) in nmg_hollow_shell and nmg_extrude_shell by allocating maxelem = (m->maxindex > 0) ? (size_t)m->maxindex + 1 : 1 instead of m->maxindex, preventing memory corruption when elements with index == maxindex are processed by NMG_INDEX_TEST_AND_SET; fixed critical copy-paste bug in nmg_fix_overlapping_loops where edge splitting on intersection endpoints incorrectly referenced eu2 instead of eu1 on dist[0] == 1.0, and nmg_esplit was erroneously confined to the interior-only else branch, leaving crossing edges completely unsplit when touching existing vertex endpoints; fixed multiple persistent memory leaks: loop_tab allocations in nmg_fix_overlapping_loops when tables were empty, outfaces in nmg_extrude_face on early error returns, and the verts table in nmg_extrude_shell when vertex recalculation failed before out: (CWE-401); replaced fatal bu_bomb abort in nmg_extrude_face on parallel extrusion with graceful error return (-1) and moved angle calculation before nmg_dup_face to prevent orphaned/leaked duplicated geometry; added loop bounds and magic number validation in nmg_start_new_loop to guard against infinite loops and type confusion; hardened verts_in_nmg_loop, verts_in_nmg_face, nmg_translate_face, nmg_find_vertex_in_lu, nmg_break_crossed_loops, and nmg_extrude_cleanup with comprehensive NULL checks, empty loop guards, and coordinate validation; in eval.c, hardened nmg_eval_action with classification table bounds checking (bs_maxindex) to prevent negative array indexing or heap out-of-bounds reads (CWE-125); added NULL guards, parent magic verification, and planar face geometry checks in nmg_ck_lu_orientation to avoid illegal dereferences on non-faceuse parents or SNURB faces; hardened nmg_eval_shell against crashing on empty loops or malformed wire edgeuse parents in BACTION_KILL; replaced unsafe sprintf with snprintf in debug plot file naming; and replaced fatal bu_bomb on plot file write failure with a non-fatal bu_log warning. |
|
||||
| `SEC-0334` | `src/libnmg/fcut.c` | `fcut.c:64-100,105-180,230-310,345-420,430-490,500-680,685-780,785-840` | Stack & Heap Uninitialized Memory / Sizeof Pointer, Persistent Memory Leaks, Division by Zero, Unsigned Underflow, Dead Code Elimination, and NULL Pointer Dereferences | 2 | `CONFIRMED` | `FIXED` | In BRL-CAD libnmg Batch 92 (fcut.c, 3,809 lines): in nmg_face_rs_init, resolved critical Cat 1 sizeof-pointer memory initialization defect (CWE-467) where memset((char *)rs, 0, sizeof(rs)) only zeroed 8 bytes (pointer size) leaving the remaining 90% of the nmg_ray_state structure filled with uninitialized stack memory; resolved multiple persistent memory leaks (CWE-401) in find_loop_to_cut and nmg_fcut_face where dynamically allocated struct loop_cuts objects in the cuts table were removed via bu_ptbl_rm or left in cuts when freeing the table without ever calling bu_free; fixed CWE-369 division-by-zero vulnerabilities across VUNITIZE calls on rs->left in nmg_face_rs_init, x_dir and y_dir in find_loop_to_cut, and x_dir and y_dir in nmg_eu_angle by guarding vector magnitude against zero before normalization; fixed CWE-191 unsigned integer underflow and infinite loop vulnerability in ptbl_vsort bubble sort loop bounds by using safe i + 1 < b->end comparison; eliminated type confusion crashes on lone vertex loops in find_best_vu by verifying parent magic (*vu->up.magic_p == NMG_EDGEUSE_MAGIC) before treating parents as edgeuses; eliminated out-of-bounds pointer reads and potential null dereferences in nmg_fcut_face traversal loops (prior_start, prior_end, next_end) by enforcing array bounds against rs->nvu; guarded ptbl_vsort against division by zero on dist_tol <= 0; added retry iteration limits and safe return paths in nmg_ck_vu_ptbl and nmg_face_cutjoin to prevent infinite loops; restored active exported implementations of nmg_sanitize_fu and nmg_wedge_class from dead code blocks; replaced fatal bu_bomb aborts across active routines with error logging and graceful failure returns; and eliminated ~2,500 lines of obsolete #if 0 dead code blocks from 1993/2017. |
|
||||
| `SEC-0335` | `src/libnmg/fuse.c` | `fuse.c:127-160,297-343,355-401,413-552,556-620,624-658,778-894,906-1025,1044-1157,1180-1382,1398-1491,1702-1765,1784-1872,2013-2074,2158-2328,2401-2500,2544-2656,2665-2799,2863-2928,3081-3175,3183-3305` | Persistent Memory Leaks, Division by Zero, Control Point Misalignment, Infinite Loops, Denial of Service / Aborts, and NULL Pointer Dereferences | 2 | `CONFIRMED` | `FIXED` | In BRL-CAD libnmg Batch 93 (fuse.c, 3,468 lines): resolved multiple persistent memory leaks (CWE-401) by freeing dynamic sort_idx_xyp allocation in nmg_edge_g_fuse which was previously never deallocated, freeing etab table on zero-count exit in nmg_edge_g_fuse, and freeing tmp table on empty-length exits in nmg_vertex_fuse and nmg_edge_fuse; fixed control points stride misalignment and buffer bounds defects in nmg_cnurb_is_linear (CWE-125 / CWE-129) where ctl_points was indexed by i instead of i * coords and compared using 3D VEQUAL instead of dimension-aware coords comparisons with EQUAL macro, as well as fixing the loop upper bound to cnrb->c_size - 1; fixed multiple CWE-369 division-by-zero vulnerabilities: guarded rise-over-run slopes (dx and dy) in nmg_edge_g_fuse across XY, XZ, and YZ planes, guarded srf->s_size[0] * srf->s_size[1] <= 0 and plane normal magnitude MAGSQ(pl) <= SMALL_FASTF in nmg_snurb_is_planar, and guarded rational weights (xyz1[coords-1] and uvw[coords-1]) in nmg_eval_linear_trim_curve and nmg_eval_trim_curve; fixed potential infinite loop hangs (CWE-835) in nmg_radial_implement_decisions and nmg_do_radial_join by adding pass progress tracking (progress++) to prevent infinite looping when skipped elements make no forward progress; eliminated 43 fatal bu_bomb aborts (CWE-400 / DoS) across topological fusing, crack classification, and radial edge joining (nmg_region_v_unique, nmg_vertex_fuse, nmg_snurb_is_planar, nmg_split_trim, nmg_cnurb_lseg_coincident, nmg_cnurb_is_on_crv, nmg_edge_fuse, nmg_ck_fu_verts, nmg_break_all_es_on_v, nmg_radial_verify_pointers, nmg_radial_verify_monotone, nmg_radial_build_list, nmg_is_crack_outie, nmg_find_radial_eu, nmg_radial_mark_cracks, nmg_radial_find_an_original, nmg_radial_mark_flips, nmg_radial_join_eu_NEW), replacing them with informative error/debug logging and graceful non-fatal fallback returns; and hardened against NULL pointer dereferences and out-of-bounds reads (CWE-476 / CWE-125) in nmg_edge_fuse, nmg_edge_g_fuse, nmg_break_all_es_on_v, nmg_break_e_on_v, and radial utilities with comprehensive parameter validation and geometry checks. |
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,465 +0,0 @@
|
||||
# BRL-CAD RMF/STIG Cat 1 Security Audit Dashboard
|
||||
**Last Updated:** 2026-10-04 17:30:00 UTC
|
||||
|
||||
## Overall Progress
|
||||
- **Total C/C++ Files:** 3493
|
||||
- **Files Reviewed:** 1595 (45.7%)
|
||||
- **Files Pending Review:** 1898
|
||||
- **Total Issues Identified:** 356
|
||||
|
||||
### Issues by Severity Potential
|
||||
| Severity Level | Count | Description |
|
||||
|:---:|:---:|:---|
|
||||
| **3 (High)** | 23 | Likely exploit or crash potential; widespread/library exposure |
|
||||
| **2 (Medium)** | 281 | Possible exploit or crash under specific circumstances |
|
||||
| **1 (Low)** | 52 | Localized / low-impact vulnerability |
|
||||
|
||||
### Issues by Verification Status
|
||||
- **Confirmed:** 0
|
||||
- **Fixed (Committed):** 356
|
||||
- **Pending Verification:** 0
|
||||
- **Disproven:** 0
|
||||
|
||||
## Subsystem Review Progress
|
||||
| Subsystem | Total Files | Reviewed | Progress | Issues Found |
|
||||
|:---|:---:|:---:|:---:|:---:|
|
||||
| `bench` | 5 | 5 | 100.0% | 1 |
|
||||
| `doc` | 19 | 0 | 0.0% | 0 |
|
||||
| `include` | 315 | 34 | 10.8% | 8 |
|
||||
| `misc` | 55 | 0 | 0.0% | 0 |
|
||||
| `regress` | 21 | 0 | 0.0% | 0 |
|
||||
| `src/adrt` | 51 | 0 | 0.0% | 0 |
|
||||
| `src/archer` | 1 | 0 | 0.0% | 0 |
|
||||
| `src/art` | 6 | 6 | 100.0% | 1 |
|
||||
| `src/brlman` | 1 | 0 | 0.0% | 0 |
|
||||
| `src/bwish` | 3 | 3 | 100.0% | 1 |
|
||||
| `src/conv/3dm` | 1 | 0 | 0.0% | 0 |
|
||||
| `src/conv/asc` | 5 | 0 | 0.0% | 0 |
|
||||
| `src/conv/bot_dump.c` | 1 | 0 | 0.0% | 0 |
|
||||
| `src/conv/comgeom` | 7 | 0 | 0.0% | 0 |
|
||||
| `src/conv/conv-vg2g.c` | 1 | 0 | 0.0% | 0 |
|
||||
| `src/conv/csg` | 2 | 0 | 0.0% | 0 |
|
||||
| `src/conv/dbupgrade.c` | 1 | 0 | 0.0% | 0 |
|
||||
| `src/conv/dxf` | 3 | 0 | 0.0% | 0 |
|
||||
| `src/conv/enf-g.c` | 1 | 0 | 0.0% | 0 |
|
||||
| `src/conv/fast4-g.c` | 1 | 0 | 0.0% | 0 |
|
||||
| `src/conv/g-acad.c` | 1 | 0 | 0.0% | 0 |
|
||||
| `src/conv/g-dot.c` | 1 | 0 | 0.0% | 0 |
|
||||
| `src/conv/g-egg.c` | 1 | 0 | 0.0% | 0 |
|
||||
| `src/conv/g-nff.c` | 1 | 0 | 0.0% | 0 |
|
||||
| `src/conv/g-obj.c` | 1 | 0 | 0.0% | 0 |
|
||||
| `src/conv/g-shell-rect.c` | 1 | 0 | 0.0% | 0 |
|
||||
| `src/conv/g-var.c` | 1 | 0 | 0.0% | 0 |
|
||||
| `src/conv/g-vdb.cpp` | 1 | 0 | 0.0% | 0 |
|
||||
| `src/conv/g-voxel.c` | 1 | 0 | 0.0% | 0 |
|
||||
| `src/conv/g-vrml.c` | 1 | 0 | 0.0% | 0 |
|
||||
| `src/conv/g-x3d.c` | 1 | 0 | 0.0% | 0 |
|
||||
| `src/conv/g-xxx.c` | 1 | 0 | 0.0% | 0 |
|
||||
| `src/conv/g-xxx_facets.c` | 1 | 0 | 0.0% | 0 |
|
||||
| `src/conv/g4-g5.c` | 1 | 0 | 0.0% | 0 |
|
||||
| `src/conv/g5-g4.c` | 1 | 0 | 0.0% | 0 |
|
||||
| `src/conv/gcv` | 1 | 0 | 0.0% | 0 |
|
||||
| `src/conv/gltf` | 1 | 0 | 0.0% | 0 |
|
||||
| `src/conv/iges` | 2 | 0 | 0.0% | 0 |
|
||||
| `src/conv/intaval` | 8 | 0 | 0.0% | 0 |
|
||||
| `src/conv/jack` | 2 | 0 | 0.0% | 0 |
|
||||
| `src/conv/k-g` | 19 | 0 | 0.0% | 0 |
|
||||
| `src/conv/nastran-g.c` | 1 | 0 | 0.0% | 0 |
|
||||
| `src/conv/nmg` | 1 | 0 | 0.0% | 0 |
|
||||
| `src/conv/obj-g.c` | 1 | 0 | 0.0% | 0 |
|
||||
| `src/conv/off` | 2 | 0 | 0.0% | 0 |
|
||||
| `src/conv/patch` | 3 | 0 | 0.0% | 0 |
|
||||
| `src/conv/ply` | 2 | 0 | 0.0% | 0 |
|
||||
| `src/conv/raw` | 6 | 0 | 0.0% | 0 |
|
||||
| `src/conv/shp` | 4 | 0 | 0.0% | 0 |
|
||||
| `src/conv/step` | 600 | 0 | 0.0% | 0 |
|
||||
| `src/conv/stl` | 2 | 0 | 0.0% | 0 |
|
||||
| `src/conv/tankill` | 1 | 0 | 0.0% | 0 |
|
||||
| `src/conv/vdeck` | 5 | 0 | 0.0% | 0 |
|
||||
| `src/conv/walk_example.c` | 1 | 0 | 0.0% | 0 |
|
||||
| `src/external` | 17 | 0 | 0.0% | 0 |
|
||||
| `src/fb` | 29 | 0 | 0.0% | 0 |
|
||||
| `src/fbserv` | 4 | 4 | 100.0% | 2 |
|
||||
| `src/gtools` | 40 | 0 | 0.0% | 0 |
|
||||
| `src/isst` | 9 | 9 | 100.0% | 1 |
|
||||
| `src/launcher` | 8 | 8 | 100.0% | 1 |
|
||||
| `src/libanalyze` | 40 | 0 | 0.0% | 0 |
|
||||
| `src/libbg` | 232 | 232 | 100.0% | 79 |
|
||||
| `src/libbn` | 41 | 41 | 100.0% | 31 |
|
||||
| `src/libbrep` | 50 | 50 | 100.0% | 5 |
|
||||
| `src/libbu` | 176 | 176 | 100.0% | 101 |
|
||||
| `src/libbv` | 19 | 19 | 100.0% | 1 |
|
||||
| `src/libdm` | 80 | 80 | 100.0% | 1 |
|
||||
| `src/libfft` | 8 | 8 | 100.0% | 1 |
|
||||
| `src/libgcv` | 111 | 111 | 100.0% | 1 |
|
||||
| `src/libged` | 509 | 509 | 100.0% | 35 |
|
||||
| `src/libicv` | 34 | 34 | 100.0% | 5 |
|
||||
| `src/libnmg` | 54 | 8 | 14.8% | 5 |
|
||||
| `src/liboptical` | 46 | 0 | 0.0% | 0 |
|
||||
| `src/libpc` | 6 | 6 | 100.0% | 1 |
|
||||
| `src/libpkg` | 10 | 10 | 100.0% | 3 |
|
||||
| `src/libqtcad` | 29 | 29 | 100.0% | 6 |
|
||||
| `src/librt` | 373 | 0 | 0.0% | 0 |
|
||||
| `src/libtclcad` | 31 | 31 | 100.0% | 7 |
|
||||
| `src/libtermio` | 2 | 2 | 100.0% | 1 |
|
||||
| `src/libwdb` | 27 | 27 | 100.0% | 2 |
|
||||
| `src/mged` | 55 | 55 | 100.0% | 16 |
|
||||
| `src/nirt` | 2 | 2 | 100.0% | 1 |
|
||||
| `src/proc-db` | 55 | 55 | 100.0% | 11 |
|
||||
| `src/qged` | 34 | 34 | 100.0% | 6 |
|
||||
| `src/remrt` | 7 | 7 | 100.0% | 2 |
|
||||
| `src/rt` | 33 | 0 | 0.0% | 0 |
|
||||
| `src/rtwizard` | 1 | 0 | 0.0% | 0 |
|
||||
| `src/shapes` | 15 | 0 | 0.0% | 0 |
|
||||
| `src/sig` | 39 | 0 | 0.0% | 0 |
|
||||
| `src/util` | 90 | 0 | 0.0% | 0 |
|
||||
|
||||
## Identified Issues Summary
|
||||
| ID | Severity | Category | File & Location | Verification | Nature of Issue |
|
||||
|:---|:---:|:---|:---|:---:|:---|
|
||||
| `SEC-0001` | **Sev 3** | Invalid Free / Crasher | `src/libpkg/pkg.c:1876-1923` | `FIXED` | pkg_waitfor fails to clear pc->pkc_buf on excess message length, causing subsequent pkg_close to call free on caller stack memory. |
|
||||
| `SEC-0002` | **Sev 2** | Uninitialized Memory Access | `src/libpkg/pkg.c:1960-1968` | `FIXED` | pkg_bwaitfor returns uninitialized heap buffer instead of NULL when network read fails or disconnects prematurely. |
|
||||
| `SEC-0003` | **Sev 1** | NULL Pointer Dereference / Crasher | `src/libpkg/example_qt/server.cpp:46-59` | `PENDING` | PKGServer destructor unconditionally dereferences NULL client pointer and frees uninitialized pkc_inbuf. |
|
||||
| `SEC-0004` | **Sev 3** | Heap Out-of-Bounds Read / Crasher | `src/fbserv/server.c:432-540` | `FIXED` | fbserv packet handlers fail to validate packet payload length against pixel count before calling fb_write, causing heap out-of-bounds read. |
|
||||
| `SEC-0005` | **Sev 3** | Integer Overflow / Heap Buffer Overflow | `src/fbserv/server.c:476-580` | `FIXED` | Integer multiplication overflow in width*height in fb_readrect and fb_bwreadrect leads to heap buffer overflow during pixel read. |
|
||||
| `SEC-0006` | **Sev 2** | Integer Signedness / Out-of-Bounds Memory Access | `src/remrt/rtsrv.c:891-971` | `FIXED` | ph_lines fails to validate pixel range bounds, causing signed integer underflow in (b-a+1)*3 to wrap to huge size_t in pkg_2send, triggering out-of-bounds heap reads, and leaks buffer. |
|
||||
| `SEC-0007` | **Sev 2** | Unhandled Input Validation / Denial of Service | `src/remrt/remrt.c:3803-3806` | `FIXED` | ph_pixels parses incoming MSG_PIXELS without checking packet length or magic header, allowing malformed network packets to trigger out-of-bounds reads or terminate remrt via bu_bomb. |
|
||||
| `SEC-0008` | **Sev 2** | Out-of-Bounds Memory Access / Buffer Underflow | `src/libbu/parse.c:87-118` | `FIXED` | bu_struct_wrap_buf and PARSE_CK_GETPUT do not verify buffer length is at least 8 bytes, causing negative index access and out-of-bounds read on buffers with small or zero length. |
|
||||
| `SEC-0009` | **Sev 2** | Format String / Type Confusion | `src/libbu/vls_vprintf.c:186-226` | `FIXED` | vls_vprintf uses bitwise XOR (^=) instead of bitwise AND NOT (&= ~) to clear length modifiers, corrupting flags and causing incorrect type extraction from va_list. |
|
||||
| `SEC-0010` | **Sev 2** | Off-by-One / Buffer Corruption | `src/libbu/vls.c:433-465` | `FIXED` | bu_vls_substr calls bu_vls_putc with NUL, embedding an unwanted NUL byte and off-by-one corrupting vls_len. |
|
||||
| `SEC-0011` | **Sev 2** | Integer Overflow / Heap Overflow | `src/libbu/malloc.c:84-145,375-388` | `FIXED` | alloc() and bu_pool_alloc() lack integer multiplication overflow checks on cnt*size, which can cause undersized memory allocations and subsequent heap buffer overflows. |
|
||||
| `SEC-0012` | **Sev 2** | Buffer Underflow / Out-of-bounds Pointer | `src/libbu/argv.c:97,175,268-295` | `FIXED` | bu_argv_from_string computed pointer at strlen(lp)-1 on potentially empty string causing integer underflow and out-of-bounds pointer arithmetic. |
|
||||
| `SEC-0013` | **Sev 2** | Buffer Over-read | `src/libbu/str.c:61-75` | `FIXED` | bu_strlcatm uses unbounded strlen on dst to detect un-terminated buffers, causing out-of-bounds read. |
|
||||
| `SEC-0014` | **Sev 2** | Null Pointer Dereference / Integer Overflow | `src/libbu/b64.c:216-284` | `FIXED` | bu_b64 encode and decode functions lacked null pointer checks on input/output and cast lengths to signed 32-bit int. |
|
||||
| `SEC-0015` | **Sev 2** | Format String / Scanset Parser Bug | `src/libbu/sscanf.c:312-320,365-375` | `FIXED` | bu_vsscanf omitted literal ] and ^] from partFmt when extracting scanset specifiers, causing malformed format strings and scan failure. |
|
||||
| `SEC-0016` | **Sev 2** | Null Pointer Dereference / Integer Overflow | `src/libbu/bitv.c:95-105,285-295,440-445,625-630` | `FIXED` | bu_hex_to_bitv and bu_binary_to_bitv2 crashed on NULL input, and bu_bitv_shift_vector had integer overflow UB on INT_MIN. |
|
||||
| `SEC-0017` | **Sev 2** | Null Pointer Dereference / Memory Safety | `src/libbu/hash.c:125-135,180-190,270-280` | `FIXED` | bu_hash_get crashed on NULL key in _nhash_keycmp, and bu_hash_create/bu_hash_set lacked allocation failure handling. |
|
||||
| `SEC-0018` | **Sev 3** | Memory Access Violation / Buffer Overflow / Out-of-bounds Pointer | `include/bu/ptbl.h, src/libbu/ptbl.c:105,119-120; 63,99,214,240,266,290` | `FIXED` | BU_PTBL_FOR macro and BU_PTBL_LASTADDR cause out-of-bounds pointer calculation and segfault on empty tables with NULL buffers, and table reallocations lack integer multiplication overflow checks. |
|
||||
| `SEC-0019` | **Sev 2** | Out-of-bounds Bit Array Access / Resource Leak / Undefined Behavior | `src/libbu/affinity.c:74,90-104,108` | `FIXED` | parallel_set_affinity permitted negative cpu indexing into CPU_SET and negative bitshift on Windows, leaked Mach thread port rights, and passed wrong policy type for Mach thread affinity. |
|
||||
| `SEC-0020` | **Sev 2** | NULL Pointer Dereference / Process Signal Safety | `src/libbu/backtrace.c:324,596,659-661,742` | `FIXED` | bu_backtrace_app called bu_strlcpy on potentially NULL gdb_path, used negative file descriptors in write, and reaped arbitrary child processes via wait(NULL). |
|
||||
| `SEC-0021` | **Sev 2** | NULL Pointer Dereference / Buffer Underflow / Crasher | `src/libbu/cmd.c:50-66` | `FIXED` | bu_cmd lacked null checks on cmds, argv, and argv[cmd_index], allowed negative cmd_index causing buffer underflow, and executed unverified function pointers. |
|
||||
| `SEC-0022` | **Sev 2** | Integer Multiplication Overflow / Crasher | `src/libbu/damlevlim.cpp:68-159` | `FIXED` | bu_editdist computed buffer allocation size as (n+1)*(m+1) using signed 32-bit int, causing signed integer multiplication overflow, out-of-bounds access, and std::length_error crash on large strings. |
|
||||
| `SEC-0023` | **Sev 2** | Heap Buffer Overflow / NULL Pointer Dereference / TOCTOU | `src/libbu/dirent.c, src/libbu/datetime.cpp:36-88; 173-197` | `FIXED` | bu_file_list called opendir(NULL) when path is NULL and suffered from heap buffer overflow if directory entries were added concurrently between passes; bu_utctime crashed on NULL vls_gmtime. |
|
||||
| `SEC-0024` | **Sev 2** | Buffer Overflow / Underflow / NULL Pointer Dereference / Infinite Loop | `src/libbu/dir.c:69-75, 108, 169, 186, 248, 254, 395-405, 480-535, 656-665, 684-740` | `FIXED` | dir routines passed caller buffer len to fixed stack arrays risking stack buffer overflow, permitted underflow pointer reads in _bu_dir_join_path, crashed on NULL result in vdir, and risked infinite loop or crash in bu_mkdir/bu_dirclear on invalid paths. |
|
||||
| `SEC-0025` | **Sev 3** | Heap Use-After-Free / Double-Free / Thread Safety | `src/libbu/dylib.c:38-40, 70-87, 105-120` | `FIXED` | bu_dlunload freed the global handles table without resetting handles to NULL or max_handles to 0, leading to dangling pointer use-after-free heap writes on subsequent bu_dlclose calls and double-free on subsequent bu_dlunload calls; routines lacked thread synchronization. |
|
||||
| `SEC-0026` | **Sev 1** | Invalid File Descriptor / Parameter Validation | `src/libbu/fchmod.cpp:62-75` | `FIXED` | bu_fchmod passed unvalidated negative file descriptors to OS handles routines triggering CRT parameter validation errors or unexpected failures. |
|
||||
| `SEC-0027` | **Sev 2** | Memory Leak / Resource Leak / NULL Pointer Dereference / Logic Flaw | `src/libbu/file.cpp:79-110, 126-166, 193, 227-240, 360, 603-640` | `FIXED` | bu_file_same leaked allocated realpath strings on match and crashed on NULL paths, file_compare_info had an assignment instead of comparison operator bug, bu_file_exists leaked file descriptors, and stream seek/tell functions crashed on NULL streams. |
|
||||
| `SEC-0028` | **Sev 2** | NULL Pointer Dereference / Crasher | `src/libbu/fnmatch.c:308-311` | `FIXED` | bu_path_match immediately dereferenced pattern and string without NULL pointer checks, causing immediate SIGSEGV crashes on NULL inputs. |
|
||||
| `SEC-0029` | **Sev 2** | Invalid Pointer Cast / NULL Pointer Dereference / Buffer Overflow | `src/libbu/gethostname.c:49, 81-84, 89` | `FIXED` | bu_gethostname passed constant (LPDWORD)MAXPATHLEN as pointer to GetComputerName causing invalid pointer crash, left procfs file pointer unchecked causing null stream crash, and lacked entry bounds validation. |
|
||||
| `SEC-0030` | **Sev 2** | NULL Pointer Dereference / Buffer Over-read / Logic Flaw | `src/libbu/getopt.c:34-39, 48-56, 65-72, 84, 98` | `FIXED` | bu_getopt dereferenced NULL nargv elements and NULL *nargv in tell macro, read out of bounds on '\0' matched in ostr via strchr, and misidentified bare '-' as an option. |
|
||||
| `SEC-0031` | **Sev 2** | NULL Pointer Dereference / Crasher | `src/libbu/glob.c:63, 84, 110, 161, 195, 240, 259, 286` | `FIXED` | bu_glob internal helpers and callbacks dereferenced NULL pattern, path, directory entry, or stat buffer pointers without checking for NULL. |
|
||||
| `SEC-0032` | **Sev 2** | Out-of-bounds Array Access / Integer Underflow | `src/libbu/heap.c:136, 200-216, 255` | `FIXED` | bu_heap_get bypassed allocation size range check when DEBUG was not defined causing out-of-bounds heap bin indexing and underflow to SIZE_MAX when sz == 0, and lacked cpu id bounds clamping. |
|
||||
| `SEC-0033` | **Sev 2** | Out-of-bounds Memory Write / NULL Pointer Dereference | `src/libbu/hist.c:52, 82-100, 117-128` | `FIXED` | bu_hist_range permitted negative or out-of-bounds 'a' indexing on NaN inputs causing heap write access violation, and bu_hist_init/bu_hist_pr crashed on NULL inputs. |
|
||||
| `SEC-0034` | **Sev 2** | Signal Handler Leak / Out-of-bounds Array Access / Logic Flaw | `src/libbu/interrupt.c:78-83, 100-116, 137-163` | `FIXED` | interrupt_restore_signal never restored signal handlers when no signal was received leaving temporary handler active indefinitely, checked wrong handler pointer, and lacked bounds check on signum. |
|
||||
| `SEC-0035` | **Sev 2** | Buffer Underflow / Integer Overflow UB / Out-of-bounds Read | `src/libbu/num.c:35-58, 87-90, 106` | `FIXED` | bu_num_print read out-of-bounds at tbl_start[-1] due to reversed condition ordering in trailing newline scan and crashed on empty strings; char_length had signed integer overflow UB on INT64_MIN and truncated 64-bit int to long. |
|
||||
| `SEC-0036` | **Sev 2** | NULL Pointer Dereference / Integer Overflow | `src/libbu/log.c:148, 156, 204, 222, 335` | `FIXED` | bu_flog lacked null pointer and empty string checks on fmt and fp, causing NULL pointer dereference crashes in fwrite, and bu_log helper routines lacked null pointer guards. |
|
||||
| `SEC-0037` | **Sev 2** | NULL Pointer Dereference / Integer Underflow | `src/libbu/mappedfile.c:360, 544-550, 577` | `FIXED` | bu_open_mapped_file_with_path crashed with SIGSEGV on NULL name or path, bu_free_mapped_files suffered from unsigned integer underflow on index removal, and bu_open_mapped_file allowed invalid file sizes. |
|
||||
| `SEC-0038` | **Sev 2** | NULL Pointer Dereference / Memory Safety | `src/libbu/observer.c:36, 58, 110, 168, 194, 215` | `FIXED` | bu_observer_cmd and helper routines dereferenced NULL argv or NULL observer lists without validation, and bu_observer_free left dangling pointers in the observer list. |
|
||||
| `SEC-0039` | **Sev 2** | Integer Underflow / NULL Pointer Dereference | `src/libbu/lex.c:42, 131, 155, 257, 268` | `FIXED` | lex_getone allowed negative *used integer underflow on number fallback, and bu_lex crashed on NULL token, rtstr, or NULL key strings. |
|
||||
| `SEC-0040` | **Sev 2** | Buffer Underflow / Concurrency Hazard / Integer Bounds | `src/libbu/path_normalize.c:47, 86-88, 95` | `FIXED` | bu_path_normalize used non-thread-safe static buffer, lacked lower-bound check in backward component scan allowing pointer underflow before resolved buffer, and used unchecked signed pointer arithmetic for MAXPATHLEN bounds check. |
|
||||
| `SEC-0041` | **Sev 2** | NULL Pointer Dereference / Undefined Bitshift / Out-of-bounds Read | `src/libbu/printb.c:36, 40-52` | `FIXED` | bu_vls_printb dereferenced NULL vls and bits strings, shifted signed 1L by negative or out-of-range bit numbers causing undefined behavior, and read out-of-bounds on strings ending after bit numbers. |
|
||||
| `SEC-0042` | **Sev 2** | NULL Pointer Dereference / Path Truncation Flaw | `src/libbu/path.c:177-180, 211-218, 242-258` | `FIXED` | bu_path_to_argv dereferenced NULL ac pointer causing crash, and bu_path_component corrupted file paths by stripping directories when a dot appeared in directory names under BU_PATH_EXTLESS and BU_PATH_EXT. |
|
||||
| `SEC-0043` | **Sev 2** | Crash / Unhandled Exception / NULL Function Pointer Dereference | `src/libbu/parallel_cpp11thread.cpp:28-51` | `FIXED` | parallel_cpp11thread crashed on NULL func callback and caused std::terminate() aborts if thread creation threw an exception while previous threads remained joinable. |
|
||||
| `SEC-0044` | **Sev 2** | Concurrency Hazard / Unchecked Buffer Overflow | `src/libbu/progname.c:74-79, 140-143, 155-190` | `FIXED` | bu_argv0_full_path and bu_getprogname returned static non-thread-safe buffers and accessed bu_progname unsynchronized with concurrent bu_setprogname writes, and bu_argv0_full_path unchecked bu_getcwd return and appended with potential buffer overflow. |
|
||||
| `SEC-0045` | **Sev 2** | NULL Pointer Dereference / Crash | `src/libbu/realpath.c:38-66` | `FIXED` | bu_file_realpath dereferenced NULL path pointer into realpath, GetFullPathName, and bu_strlcpy fallback causing immediate SIGSEGV crashes. |
|
||||
| `SEC-0046` | **Sev 2** | Format String Flaw / Uninitialized Variable Memory Corruption | `src/libbu/scan.c:38, 58-60, 68-73, 89-93` | `FIXED` | bu_scan_fastf_t constructed dynamic scanf format strings from user delimiter allowing format string injection, and read uninitialized stack variable 'len' into offset when sscanf failed to reach %n specifier. |
|
||||
| `SEC-0047` | **Sev 2** | Out-of-bounds Array Access / Concurrency Race Condition | `src/libbu/semaphore.c:260-286, 298-301, 340-343` | `FIXED` | bu_semaphore_acquire and bu_semaphore_release lacked upper bounds checks on semaphore index causing out-of-bounds array access and integer overflow on UINT_MAX, and bu_semaphore_free destroyed mutexes without synchronizing on bu_init_lock. |
|
||||
| `SEC-0048` | **Sev 2** | NULL Pointer Dereference / Memory Safety | `src/libbu/sha1.c:53, 110, 126, 150` | `FIXED` | SHA1Transform, SHA1Init, SHA1Update, and SHA1Final lacked NULL pointer validation on context, data, digest, state, and buffer pointers causing SIGSEGV crashes. |
|
||||
| `SEC-0049` | **Sev 1** | Integer Overflow UB / Logic Flaw | `src/libbu/snooze.cpp:35-42` | `FIXED` | bu_snooze lacked upper bound clamping on 64-bit useconds causing integer overflow when converted to nanoseconds internally in std::chrono durations. |
|
||||
| `SEC-0050` | **Sev 2** | Memory Access Flaw / Divide by Zero | `src/libbu/sort.c:156-189, 381-402` | `FIXED` | bu_sort lacked checks for NULL a, NULL cmp, zero element size es == 0 (causing division by zero in introsort), and min(a, b) macro lacked parameter parentheses. |
|
||||
| `SEC-0051` | **Sev 2** | Buffer Underflow / Pointer Overflow | `src/libbu/tbl.c:381-432` | `FIXED` | bu_tbl_printf suffered from backward scan buffer underflow dereferencing buf[-1] and unbounded runaway pointer increment last += 2 over-reading memory. |
|
||||
| `SEC-0052` | **Sev 2** | Null Pointer Dereference / Memory Management | `src/libbu/tc.c:33-200, 428-456` | `FIXED` | bu_thrd_create dereferenced NULL thr pointer and lacked guard on NULL func; mutex and condition variable routines lacked NULL checks; used raw malloc/free. |
|
||||
| `SEC-0053` | **Sev 2** | Buffer Over-read / Null Pointer Dereference | `src/libbu/tcllist.c:538, 554-565` | `FIXED` | bu_argv_from_tcl_list crashed on NULL arguments; _bu_tcl_copy_collapse passed strlen(src) instead of remaining count to _bu_tcl_parse_backslash, allowing read out of bounds past list element. |
|
||||
| `SEC-0054` | **Sev 3** | Uninitialized Memory / Heap Corruption / Concurrency | `src/libbu/temp.c:85-151, 155-175` | `FIXED` | temp_add_to_list failed to copy initial_temp_files when reallocating from 8 to 16 elements, reading uninitialized memory and calling close() on garbage file descriptors at exit; global temp list lacked thread synchronization. |
|
||||
| `SEC-0055` | **Sev 2** | Buffer Underflow / Null Pointer Dereference | `src/libbu/units.c:237-244, 256-270, 390-440` | `FIXED` | units_name_matches underflowed bu_vls_strlen - 1 to SIZE_MAX on empty strings/whitespace, causing out-of-bounds heap read; bu_units_conversion, bu_mm_value, and bu_mm_cvt crashed on NULL pointers. |
|
||||
| `SEC-0056` | **Sev 1** | Null Pointer Dereference / Integer Overflow UB | `src/libbu/units_dehumanize.c:80-92, 131-137` | `FIXED` | bu_dehumanize_number crashed on NULL str or size and performed signed multiplication without pre-overflow bounds check. |
|
||||
| `SEC-0057` | **Sev 2** | Null Pointer Dereference / Integer Overflow UB | `src/libbu/units_humanize.c:74-82, 128-133` | `FIXED` | bu_humanize_number dereferenced buf[0] before validating buf != NULL, causing crash when called with a NULL buffer; negation of INT64_MIN caused signed integer overflow UB. |
|
||||
| `SEC-0058` | **Sev 2** | Buffer Overflow / Null Pointer Dereference / Logic Flaw | `src/libbu/uuid.c:56, 89, 118-124, 134-161` | `FIXED` | bu_uuid_decode suffered critical 16-byte buffer overflow writing 32 bytes to a 16-byte array on non-adjacent hex strings; bu_uuid_create crashed on NULL uuid and corrupted UUIDv5 bits with 0x5F instead of 0x50; bu_uuid_encode crashed on NULL pointers. |
|
||||
| `SEC-0059` | **Sev 2** | File Descriptor Leak / Uninitialized Data / Null Dereference | `src/libbu/vfont.c:42, 60-100, 140-150, 184-196, 201-207` | `FIXED` | vfont_get passed potential NULL from bu_dir() to snprintf %s, left 256th dispatch entry uninitialized (i < 255), leaked file descriptors on read failures in get_font, and vfont_free crashed on NULL pointer. |
|
||||
| `SEC-0060` | **Sev 2** | Integer Overflow / Null Pointer Dereference | `src/libbu/vlb.c:34-160` | `FIXED` | bu_vlb_write lacked integer overflow protection on capacity addition and crashed when given NULL start; bu_vlb_init, bu_vlb_initialize, bu_vlb_free, and bu_vlb_print crashed on NULL pointers. |
|
||||
| `SEC-0061` | **Sev 2** | Undefined Behavior / Memory Leak / Null Pointer Dereference | `src/libbu/cache.cpp:110-140, 220-250, 480-510` | `FIXED` | bu_cache_close freed bu_cache_impl containing std::mutex with BU_PUT instead of delete causing destructor bypass and undefined behavior; bu_cache_keys leaked keystr memory; bu_cache_write_commit underflowed mv_size on negative lengths; NULL txn crashed transactions. |
|
||||
| `SEC-0062` | **Sev 2** | Null Pointer Dereference / Float Validity | `src/libbu/color.cpp:52-95, 120-160` | `FIXED` | bu_color_from_str, bu_rgb_to_hsv, and bu_hsv_to_rgb dereferenced NULL pointers unconditionally without validation; bu_color_from_rgb_floats lacked bounds and finite checks. |
|
||||
| `SEC-0063` | **Sev 2** | Buffer Overflow / Unsigned Underflow | `src/libbu/convert.c:120-160, 200-240` | `FIXED` | bu_cv_fmt_cookie decremented buflen below zero on small buffers (1-2 bytes), wrapping to SIZE_MAX and writing out of bounds; bu_cv_w_cookie and byte swap routines crashed on NULL or empty input. |
|
||||
| `SEC-0064` | **Sev 2** | File Descriptor Leak / Null Pointer Dereference | `src/libbu/crashreport.c:110-140, 210-230` | `FIXED` | bu_crashreport leaked file descriptor when ferror(fp) was true, and formatted potential NULL return from ctime(). |
|
||||
| `SEC-0065` | **Sev 2** | Memory Leak / Null Pointer Dereference / Unchecked Input | `src/libbu/env.c:140-190, 240-270` | `FIXED` | editor_not_compatible leaked component vls and dereferenced NULL candidate; editor_file_check lacked NULL checks; bu_setenv lacked POSIX environment variable name validation. |
|
||||
| `SEC-0066` | **Sev 2** | Null Pointer Dereference / Buffer Over-read / Type Mismatch | `src/libbu/opt.c:215-260, 480-520` | `FIXED` | opt_describe_internal_ascii crashed when arg_helpstr or help_string was NULL; docbook describe had curr vs d typo; opt_process over-read empty candidate; bu_opt_color had unsigned char type mismatch. |
|
||||
| `SEC-0067` | **Sev 2** | Out-of-Bounds Memory Access | `src/libbu/parallel.c:280-310` | `FIXED` | PARALLEL_PUT accessed mapping[id] without validating 0 <= id < MAX_PSW*MAX_PSW, causing out-of-bounds memory corruption. |
|
||||
| `SEC-0068` | **Sev 2** | Null Pointer Dereference / Memory Leak / Buffer Overflow | `src/libbu/process.c:350-380, 520-560, 1220-1250` | `FIXED` | bu_process_read unconditionally dereferenced *count = ... even if caller passed NULL; bu_process_exec leaked heap av on every execution; bu_interactive passed unchecked fd to FD_SET causing buffer overflow. |
|
||||
| `SEC-0069` | **Sev 2** | Null Pointer Dereference | `src/libbu/uce-dirent.h:348-354, 578-583, 608-612` | `FIXED` | opendir, rewinddir, and _initdir relied solely on assert() in debug mode, crashing with NULL pointer dereference in release builds when given NULL dirname or DIR stream. |
|
||||
| `SEC-0070` | **Sev 2** | Unhandled Exception / Denial of Service Crash | `src/libbu/vls_incr.cpp:136-155, 180-188` | `FIXED` | bu_vls_incr accessed ivar.str(1) and nvar.str(1) without verifying match group count, throwing std::out_of_range which bypassed catch (const std::regex_error&) and crashed the application. |
|
||||
| `SEC-0071` | **Sev 2** | Null Pointer Dereference | `src/libbu/whereami.c:95-135` | `FIXED` | _bu_getExecutablePath dereferenced pname[0] without checking if _bu_progname_raw() returned NULL, and copied memory into out when out == NULL. |
|
||||
| `SEC-0072` | **Sev 2** | Infinite Loop / Denial of Service | `src/libbu/whereis.c:135-155` | `FIXED` | bu_whereis bypassed pointer advancement on dirlen > MAXPATHLEN-2 with continue;, causing an infinite loop hanging the process at 100% CPU. |
|
||||
| `SEC-0073` | **Sev 2** | Infinite Loop / Memory Leak | `src/libbu/which.c:91-115` | `FIXED` | which_path suffered infinite loop on oversized directories and empty matches, and leaked initial_path every time an executable was not found. |
|
||||
| `SEC-0074` | **Sev 2** | Null Pointer Dereference | `src/libbu/xdr.c:31-88` | `FIXED` | bu_pshort, bu_gshort, bu_plong, bu_glong, and bu_plonglong dereferenced msgp without validating msgp != NULL, causing immediate segmentation fault. |
|
||||
| `SEC-0075` | **Sev 2** | Memory Leak / Null Pointer Dereference | `src/libbu/tests/dylib/dylib.c:35-85` | `FIXED` | bu_file_list allocated filenames and bu_vls plugin_pattern allocated memory which was never freed; dylib_close_plugins dereferenced NULL pointer when called with plugins == NULL. |
|
||||
| `SEC-0076` | **Sev 2** | Null Pointer Dereference | `src/libbu/tests/dylib/plugin_1.cpp:22-28` | `FIXED` | calc dereferenced *result without checking if *result == NULL, causing crash on NULL buffer pointer. |
|
||||
| `SEC-0077` | **Sev 2** | Null Pointer Dereference | `src/libbu/tests/dylib/plugin_2.cpp:22-28` | `FIXED` | calc dereferenced *result without checking if *result == NULL, causing crash on NULL buffer pointer. |
|
||||
| `SEC-0078` | **Sev 2** | Stack Buffer Overflow / Format String UB | `src/libbu/tests/test_dirname.c:58-82` | `FIXED` | bu_strlcpy used strlen(input)+1 instead of destination buffer size, causing stack buffer overflow on strings exceeding 1000 bytes; passed NULL to printf format string. |
|
||||
| `SEC-0079` | **Sev 1** | Undefined Behavior / Crash | `src/libbu/tests/test_encode.c:70-90` | `FIXED` | Passed NULL str directly to %*s and %s in printf when testing test_encode(NULL), causing undefined behavior and potential crash. |
|
||||
| `SEC-0080` | **Sev 1** | Memory Leak / Unchecked Return | `src/libbu/tests/test_datetime.c:243-345` | `FIXED` | result VLS was allocated and never freed across multiple date/time tests, leaking memory; sscanf return value was unvalidated. |
|
||||
| `SEC-0081` | **Sev 2** | Null Pointer Dereference / Crash | `src/libbu/tests/test_basename.c:55-65, 130-140` | `FIXED` | get_system_output(NULL) called basename(NULL) which causes segmentation fault on glibc implementations; passed NULL input to bu_log format strings. |
|
||||
| `SEC-0082` | **Sev 2** | Heap Buffer Overflow / Off-by-one | `src/libbu/tests/test_progname.c:63-71, 107-115, 149-157, 189-197` | `FIXED` | Allocated strlen(path) bytes via bu_calloc without space for null terminator before calling bu_strlcpy, causing buffer overflow; leaked allocated buffer. |
|
||||
| `SEC-0083` | **Sev 2** | Use-After-Free / Memory Leak / Float Comparison | `src/libbu/tests/test_mappedfile.c:70-74, 385-397` | `FIXED` | Accessed mfp->buf after closing mapped file via bu_close_mapped_file, performed raw float equality on double num, and leaked fname VLS. |
|
||||
| `SEC-0084` | **Sev 2** | Process Resource Leak / NULL Pointer Dereference | `src/libbu/tests/test_process.c:172-184, 521-536, 680-705` | `FIXED` | Failed to wait on or close process handles on error paths leaking processes, and attempted to close/read NULL file handles when fopen failed. |
|
||||
| `SEC-0085` | **Sev 2** | Array Out-of-Bounds / Crash | `src/libbu/tests/test_parallel.c:70-80, 115-125` | `FIXED` | Indexed counter array with cpu ID up to ncpu in tally without bound check, and omitted NULL data check in parallel recursion callback. |
|
||||
| `SEC-0086` | **Sev 2** | Out-of-Bounds Memory Read / Pointer Type-Punning | `src/libbu/tests/test_opt.c:58-64, 492-498` | `FIXED` | Read av[-1] when av was decremented without checking bounds, and type-punned unsigned int array to unsigned char pointer violating strict aliasing. |
|
||||
| `SEC-0087` | **Sev 2** | NULL Pointer Dereference / Memory Leak | `src/libbu/tests/test_hook.c:45-55, 120-145` | `FIXED` | Callback dereferenced clientdata pointer without NULL check and hook list structures were allocated and never freed across tests. |
|
||||
| `SEC-0088` | **Sev 2** | Out-of-Bounds Read / NULL Pointer Dereference | `src/libbu/tests/test_glob.c:95-110, 195-205` | `FIXED` | Read buffer out of bounds when checking trailing slash on short paths and called glob operations without validating NULL context pointers. |
|
||||
| `SEC-0089` | **Sev 1** | Resource Leak / Unchecked Return Value | `src/libbu/tests/test_env.c:80-92, 128-135` | `FIXED` | Did not check fopen return value before writing and failed to validate bu_strdup return value leaking memory on error. |
|
||||
| `SEC-0090` | **Sev 1** | NULL Pointer Dereference / Format Flaw | `src/libbu/tests/test_escape.c:72-85, 140-150` | `FIXED` | Passed unverified pointer to %s format specifier in printf calls and omitted explicit return code in test helper. |
|
||||
| `SEC-0091` | **Sev 1** | Format String Flaw / NULL Dereference | `src/libbu/tests/test_path_component.c:62-75` | `FIXED` | Passed NULL pointer to %24s in bu_log formatting calls, which crashes strict C runtime environments. |
|
||||
| `SEC-0092` | **Sev 1** | Memory Leak | `src/libbu/tests/test_humanize_number.c:115-135` | `FIXED` | Allocated string representations of flags and scale inside loop iterations without freeing them, causing repeated memory leaks. |
|
||||
| `SEC-0093` | **Sev 1** | Memory Leak / NULL Pointer Dereference | `src/libbu/tests/test_file.c:70-75, 233-241` | `FIXED` | cleanup() function leaked fname VLS allocation on return, and realpath test did not check if rpath was NULL before comparing. |
|
||||
| `SEC-0094` | **Sev 1** | Unchecked Return Value / Array Bounds | `src/libbu/tests/test_file_mime.c:45-56` | `FIXED` | Did not check sscanf return count allowing uninitialized integer use, and allowed negative context index causing out-of-bounds array access. |
|
||||
| `SEC-0095` | **Sev 1** | NULL Pointer Dereference | `src/libbu/tests/test_observer.c:45-55` | `FIXED` | Missing NULL check on observer callback event structure pointer before dereferencing. |
|
||||
| `SEC-0096` | **Sev 1** | NULL Pointer Dereference | `src/libbu/tests/test_parallel_concurrency.cpp:40-48` | `FIXED` | Thread worker function dereferenced user data pointer without checking for NULL. |
|
||||
| `SEC-0097` | **Sev 1** | Resource Leak / Empty String Check | `src/libbu/tests/test_path_match.cpp:38-52` | `FIXED` | ifstream remained open without explicit close and empty lines were parsed without validation. |
|
||||
| `SEC-0098` | **Sev 2** | POSIX/Darwin API Resolution / Failure to Canonicalize | `src/libbu/realpath.c:20-27` | `FIXED` | Under strict POSIX/XOPEN flags on macOS without _DARWIN_C_SOURCE, realpath bound to legacy conformance symbol which failed with EPERM, breaking path canonicalization across libbu. |
|
||||
| `SEC-0099` | **Sev 2** | Memory Management / Resource Leak | `src/libbu/tests/test_realpath.c:47-79` | `FIXED` | Heap memory leak of allocated path string, unchecked sscanf return value, and potential NULL printf argument in test_realpath.c. |
|
||||
| `SEC-0100` | **Sev 1** | Memory Access / NULL Pointer Dereference | `src/libbu/tests/test_semaphore.c:48-62` | `FIXED` | Unchecked callback argument pargs in multi-threaded function increment_thread could lead to NULL pointer dereference. |
|
||||
| `SEC-0101` | **Sev 2** | Memory Access / Out-of-bounds Read | `src/libbu/tests/test_semaphore_registry.cpp:60-63` | `FIXED` | Unguarded argv[0] dereference passed to bu_setprogname when argv could be NULL or empty. |
|
||||
| `SEC-0102` | **Sev 2** | Error Handling / Logic Error | `src/libbu/tests/test_semchk.cpp:40-75` | `FIXED` | Undeclared identifier av[0] passed to bu_setprogname, unhandled file stream failure in process_file, and unguarded argv dereference. |
|
||||
| `SEC-0103` | **Sev 2** | Memory Access / Out-of-bounds Read | `src/libbu/tests/test_snooze.c:44-48` | `FIXED` | Unguarded argv[0] dereference passed to bu_setprogname when argv could be NULL or empty. |
|
||||
| `SEC-0104` | **Sev 1** | Integer Wraparound / Underflow | `src/libbu/tests/test_sort.c:45-95` | `FIXED` | Integer subtraction bug in comparison function comp_1 (*(unsigned int *)num1 - *(unsigned int *)num2) caused unsigned underflow and reversed sort order; comp_4 lacked NULL pointer checks; sscanf return was unchecked. |
|
||||
| `SEC-0105` | **Sev 2** | Memory Access / Out-of-bounds Read | `src/libbu/tests/test_static_init.cpp:44-48` | `FIXED` | Unguarded argv[0] dereference passed to bu_setprogname when argv could be NULL or empty. |
|
||||
| `SEC-0106` | **Sev 2** | Memory Management / Resource Leak | `src/libbu/tests/test_str.c:115-180` | `FIXED` | Memory leaks of allocated dst buffer across test_bu_strlcatm, test_bu_strlcpym, and test_bu_strdupm, unchecked sscanf, and negative integer cast to size_t. |
|
||||
| `SEC-0107` | **Sev 2** | Format String / NULL Pointer Dereference | `src/libbu/tests/test_str_isprint.c:70-98` | `FIXED` | Passing NULL string pointer to %10s format specifier in bu_log caused undefined behavior / crash; unchecked sscanf. |
|
||||
| `SEC-0108` | **Sev 2** | Uninitialized Memory Access | `src/libbu/tests/test_subprocess.cpp:45-55` | `FIXED` | Stack buffer char line[25] was uninitialized before std::cin.get(line, 25), leading to uninitialized memory read if stream was empty or in error state. |
|
||||
| `SEC-0109` | **Sev 1** | Concurrency / Out-of-bounds Memory Access | `src/libbu/tests/test_temp_filename.c:45-78` | `FIXED` | Passed &names (char ***) instead of names (char **) to bu_parallel, causing worker threads with cpu > 1 to read and write invalid stack memory outside the array; names[cpu - 1] caused underflow on cpu = 0; off-by-one heap allocation len + 1 caused string truncation. |
|
||||
| `SEC-0110` | **Sev 2** | Memory Access / NULL Pointer Dereference | `src/libbu/tests/test_units.c:48-58` | `FIXED` | Missing NULL pointer validation for csv and token in helper function units_csv_has_token. |
|
||||
| `SEC-0111` | **Sev 2** | Logic Error / False-Pass Test Suite Flaw | `src/libbu/tests/test_uuid.c:55-90` | `FIXED` | Typo in expected UUID string paired with inverted condition !bu_strcmp caused test suite to return 0 (PASS) on mismatch while returning 1 (FAIL) if it matched; missing error logging. |
|
||||
| `SEC-0112` | **Sev 2** | Memory Access / Out-of-bounds Read | `src/libbu/tests/test_version.c:35-48` | `FIXED` | Missing common.h include and unguarded av[0] dereference passed to bu_setprogname. |
|
||||
| `SEC-0113` | **Sev 2** | Memory Access / Out-of-bounds Read | `src/libbu/tests/test_vlb.c:42-46` | `FIXED` | Unguarded argv[0] dereference passed to bu_setprogname when argv could be NULL or empty. |
|
||||
| `SEC-0114` | **Sev 2** | Memory Management / Resource Leak | `src/libbu/tests/test_vls.c:115-680` | `FIXED` | Heap memory leaks across 13 test functions using bu_vls_strdup solely for comparison without freeing the returned string; out-of-bounds argv access in test_bu_vls_substr; unchecked sscanf. |
|
||||
| `SEC-0115` | **Sev 2** | Input Validation / Integer Parsing | `src/libbu/tests/test_vls_incr.c:58-85` | `FIXED` | Unguarded argv dereference and unvalidated strtol conversion where invalid characters or out-of-range counts were unhandled. |
|
||||
| `SEC-0116` | **Sev 2** | Memory Management / Resource Leak | `src/libbu/tests/test_vls_incr_uniq.cpp:50-93` | `FIXED` | Memory leak of struct bu_vls name on exit; heap allocation leak of std::set on early exit; potential NULL pointer dereference in StrCmp. |
|
||||
| `SEC-0117` | **Sev 2** | Memory Access / Out-of-bounds Read | `src/libbu/tests/test_vls_simplify.c:56-85` | `FIXED` | Unguarded argv dereference before bu_setprogname, potential NULL pointer dereference in bu_log format string. |
|
||||
| `SEC-0118` | **Sev 1** | Buffer Overflow / Stack Vulnerability | `src/libbu/tests/test_vls_vprintf.c:55-175` | `FIXED` | Unbounded vsprintf into fixed 1024-byte stack buffer buffer[1024] created an unconstrained stack buffer overflow vulnerability; unchecked sscanf and unguarded argv. |
|
||||
| `SEC-0119` | **Sev 1** | Numerical Stability / NaN Generation | `src/libbn/anim.c:304-332` | `FIXED` | anim_mat2quat negative square root NaN generation caused by floating-point rounding when testing !ZERO(square); passed minute negative numbers into sqrt() resulting in NaN quaternion components. |
|
||||
| `SEC-0120` | **Sev 1** | Buffer Overflow | `src/libbn/anim.c:153-176` | `FIXED` | anim_mat_printf stack buffer overflow risk with fixed 128-byte character buffer when formatting 16 double-precision float values with custom prefix strings. |
|
||||
| `SEC-0121` | **Sev 2** | Null Pointer Dereference | `src/libbn/anim.c:180-680` | `FIXED` | Missing NULL pointer checks across anim_mat_print, anim_dir2mat, anim_dirn2mat, anim_steer_mat, anim_v_permute, anim_v_unpermute, anim_tran, anim_mat2zyx, and anim_mat2ypr. |
|
||||
| `SEC-0122` | **Sev 2** | Null Pointer Dereference | `src/libbn/complex.c:54-85` | `FIXED` | bn_cx_div and bn_cx_sqrt dereferenced destination and operand pointers without validating against NULL. |
|
||||
| `SEC-0123` | **Sev 1** | Stack Buffer Overflow | `src/libbn/mat.c:1544-1578` | `FIXED` | bn_opt_mat looped up to argc when argc > 15, writing into fixed 16-element stack array fastf_t mtmp[16], overflowing the stack frame on excess arguments. |
|
||||
| `SEC-0124` | **Sev 1** | Out-of-bounds Read | `src/libbn/mat.c:1500-1540` | `FIXED` | bn_opt_mat out-of-bounds read when checking trailing closing brace with bu_vls_addr(&str)[bu_vls_strlen(&str)-1] without verifying bu_vls_strlen > 0. |
|
||||
| `SEC-0125` | **Sev 1** | Buffer Overflow | `src/libbn/mat.c:80-140` | `FIXED` | bn_mat_print_guts wrote into fixed obuf array without checking remaining capacity against bu_vls length, leading to potential buffer overflow. |
|
||||
| `SEC-0126` | **Sev 1** | Concurrency Data Race / Logic Bug | `src/libbn/mat.c:1000-1060` | `FIXED` | bn_wrt_point_direc declared transformation matrices as static local variables, causing data corruption across concurrent raytracing threads, and had inverted translation vector origin_to_pt. |
|
||||
| `SEC-0127` | **Sev 2** | Division by Zero | `src/libbn/mat.c:1100-1200` | `FIXED` | persp_mat and deering_persp_mat performed division by near_plane, right-left, and bottom-top without checking for zero denominators. |
|
||||
| `SEC-0128` | **Sev 2** | Memory Access / Use-After-Free Prevention | `src/libbn/msr.c:120-135` | `FIXED` | bn_gauss_free lacked NULL pointer guard and failed to clear magic identifier before freeing heap structure. |
|
||||
| `SEC-0129` | **Sev 3** | Dead Code | `src/libbn/mt19937ar.c:170-257` | `FIXED` | Dead #if 0 code block with test main function embedded within shared library source file. |
|
||||
| `SEC-0130` | **Sev 1** | Heap Memory Corruption | `src/libbn/multipoly.c:80-101` | `FIXED` | bn_multipoly_grow realloc corruption passing outer pointer array P->cf instead of row array P->cf[i] with sizeof(double*) instead of sizeof(double), overwriting row pointers with pointer array address. |
|
||||
| `SEC-0131` | **Sev 1** | Out-of-bounds Access | `src/libbn/multipoly.c:80-101` | `FIXED` | bn_multipoly_grow failed to update P->dgrs and P->dgrt dimensions after growing, leaving stale dimensions that caused subsequent operations to access out of bounds or fail to allocate. |
|
||||
| `SEC-0132` | **Sev 1** | Out-of-bounds Read | `src/libbn/multipoly.c:120-132` | `FIXED` | bn_multipoly_add out-of-bounds read when polynomials had differing degrees, reading beyond allocated row bounds, and dimension calculation typo Max(p1->dgrt, p2->dgrs) instead of p2->dgrt. |
|
||||
| `SEC-0133` | **Sev 1** | Logic / Numerical Error | `src/libbn/multipoly.c:140-155` | `FIXED` | bn_multipoly_mul overwrote accumulated product terms using = instead of +=, destroying earlier polynomial term contributions sharing identical combined powers. |
|
||||
| `SEC-0134` | **Sev 1** | Resource Leak | `src/libbn/multipoly.c:70-75` | `FIXED` | Missing bn_multipoly_free function causing 100% memory leak of all 2D dynamically allocated bivariate polynomial matrices. |
|
||||
| `SEC-0135` | **Sev 2** | Null Pointer Dereference / Dead Code | `src/libbn/noise.c:248-430` | `FIXED` | Missing NULL pointer validation on point and result in bn_noise_perlin, bn_noise_vec, and spectral functions; 22 lines of dead #if 0 code in bn_noise_mf. |
|
||||
| `SEC-0136` | **Sev 1** | Out-of-bounds Access / Allocation Flaw | `src/libbn/noise.c:460-545` | `FIXED` | build_spec_tbl and find_spec_wgt allowed negative or zero octaves, leading to invalid memory allocation size (int)(octaves+1) <= 0 and out-of-bounds weight table indexing. |
|
||||
| `SEC-0137` | **Sev 1** | Resource Leak / Typo | `src/libbn/numgen.c:52-72` | `FIXED` | bn_numgen_create allocated generator on the heap before validating dim > 0 and seed < 0, leaking the allocated structure on early return; nperiodic typo in flag check. |
|
||||
| `SEC-0138` | **Sev 1** | Memory Corruption / Pointer Aliasing | `src/libbn/poly.c:50-168` | `FIXED` | In-place pointer aliasing in bn_poly_mul, bn_poly_add, and bn_poly_sub when destination pointer equaled one of the operand polynomials caused coefficients to be overwritten before being read. |
|
||||
| `SEC-0139` | **Sev 1** | Buffer Overflow / Unsigned Underflow | `src/libbn/poly.c:170-197` | `FIXED` | bn_poly_synthetic_division assigned -1 to unsigned size_t quo->dgr when divisor degree exceeded dividend degree, underflowing to SIZE_MAX and triggering an unbounded loop writing past the 7-element coefficient array. |
|
||||
| `SEC-0140` | **Sev 2** | Null Pointer Dereference | `src/libbn/poly.c:200-488` | `FIXED` | Missing NULL pointer checks in bn_poly_quadratic_roots, bn_poly_cubic_roots, bn_poly_quartic_roots, bn_pr_poly, and bn_pr_roots. |
|
||||
| `SEC-0141` | **Sev 2** | Memory Access Violation / Numerical Robustness | `src/libbn/qmath.c:84-331` | `FIXED` | In quat_mat2quat, negative diagonal difference caused NaN and division-by-zero on non-orthogonal matrices; acos() called on unconstrained dot products causing NaN domain errors; missing NULL pointer checks across quaternion math operations. |
|
||||
| `SEC-0142` | **Sev 2** | Denial of Service / Memory Access Violation | `src/libbn/randsph.c:50-120` | `FIXED` | Potential infinite loop in _bn_unit_sph_sample when bn_randmt() yields exactly 0.5; possible NaN from sqrt(1 - S) when S slightly exceeds 1 due to floating-point rounding; unchecked return value from bn_sobol_next in _bn_unit_sph_sample_sobol. |
|
||||
| `SEC-0143` | **Sev 2** | Null Pointer Dereference | `src/libbn/sobol.c:148-325` | `FIXED` | bn_sobol_create did not check the return status of sobol_init, creating partially initialized structures with NULL member pointers when sdim was invalid; rightzero32 had undefined behavior if invoked with 0xffffffffU; _sobol_urand and bn_sobol_next lacked NULL pointer checks. |
|
||||
| `SEC-0144` | **Sev 1** | Buffer Overflow / Resource Leak | `src/libbn/sphmap.c:35-315` | `FIXED` | Heap buffer overflow in bn_spm_pix_load which allocated nx*nx*3 bytes instead of nx*ny*3 while reading nx*ny*3 bytes; permanent memory leak of buffer on fread failure; out-of-bounds array reads and writes in bn_spm_read, bn_spm_write, and bn_spm_get when u or v >= 1.0 or negative; bn_spm_free checked magic number before checking for NULL pointer. |
|
||||
| `SEC-0145` | **Sev 2** | Uninitialized Memory Read | `src/libbn/str.c:42-177` | `FIXED` | bn_decode_mat, bn_decode_quat, and bn_decode_vect copied uninitialized stack memory into destination buffers when sscanf matched fewer items than required or failed; missing NULL pointer checks across decode and encode routines. |
|
||||
| `SEC-0146` | **Sev 2** | Null Pointer Dereference / Resource Leak | `src/libbn/tabdata.c:35-1215` | `FIXED` | Second pass fopen in bn_read_table_and_tabdata was unchecked, causing NULL pointer dereference in bu_fgets if reopening failed; memory leak of allocated table/tabdata on read failure; unsigned integer underflow in bn_table_delete_sample_pnts when i > j; NULL pointer dereference in bn_table_free and bn_tabdata_free. |
|
||||
| `SEC-0147` | **Sev 2** | Undefined Behavior | `src/libbn/ulp.c:118-204` | `FIXED` | Referenced non-existent union member d in union flt_bits (val.d += 1 and minVal.d = 1 << 23); undefined behavior in signed 32-bit shift 1 << 52 when setting 64-bit exponent. |
|
||||
| `SEC-0148` | **Sev 1** | Resource Leak | `src/libbn/wavelet.c:170-625` | `FIXED` | Permanent memory leaks in make_wlt_haar_2d_decompose, make_wlt_haar_2d_reconstruct, and make_wlt_haar_2d_decompose2 when tbuffer/tbuf is NULL because allocated buffers were never freed; missing NULL buffer and zero dimension validation across wavelet routines. |
|
||||
| `SEC-0149` | **Sev 1** | Null Pointer Dereference | `src/libbn/tests/test_util.c:48-265` | `FIXED` | Missing NULL pointer checks in test helper and test dispatch functions (mat_close, vect_close, hvect_close, finite_vec, orthonormal_rotation, normalize_quat, make_table, make_tabdata, bn_api_single, and bn_api_dispatch) when called with NULL pointers or empty argument lists. |
|
||||
| `SEC-0150` | **Sev 1** | Out-of-Bounds Read | `src/libbg/pca.cpp:55-80` | `FIXED` | bg_pca computed Thin U on a 3xnpnts matrix using JacobiSVD. When npnts < 3, Thin U has fewer than 3 columns, causing out-of-bounds column reads and assertions when indexing svd.matrixU()(row, 1) and svd.matrixU()(row, 2). |
|
||||
| `SEC-0151` | **Sev 2** | Logic / Format String Flaw | `src/libbg/pointgen.c:35-60` | `FIXED` | bg_sph_sample referenced undeclared variable sample instead of pnts[i], used %d format specifier for size_t integers in bu_log, checked sample instead of center for translation offset, and lacked defensive NULL pointer validation on pnts. |
|
||||
| `SEC-0152` | **Sev 2** | NULL Pointer Dereference | `src/libbg/sat.cpp:44-175` | `FIXED` | bg_sat_line_aabb, bg_sat_line_obb, bg_sat_tri_aabb, bg_sat_tri_obb, bg_sat_aabb_obb, and bg_sat_obb_obb called v3_from_array and axis_and_extent_from_vect without verifying point_t and vect_t pointer arguments, leading to null pointer dereferences. |
|
||||
| `SEC-0153` | **Sev 2** | NULL Pointer Dereference | `src/libbg/lseg_lseg.cpp:37-45` | `FIXED` | bg_distsq_lseg3_lseg3 unpacked input point arrays without null pointer validation and lacked extern C linkage in its C++ definition. |
|
||||
| `SEC-0154` | **Sev 2** | NULL Pointer Dereference | `src/libbg/lseg_pt.cpp:36-45` | `FIXED` | bg_distsq_lseg3_pt indexed point coordinates without checking for null pointers. |
|
||||
| `SEC-0155` | **Sev 2** | NULL Pointer Dereference / Domain Error | `src/libbg/tri_pt.cpp:37-60` | `FIXED` | bg_tri_closest_pt indexed triangle vertices and sample points without null pointer checks and computed std::sqrt(result.sqrDistance) without non-negative clamping. |
|
||||
| `SEC-0156` | **Sev 2** | NULL Pointer Dereference | `src/libbg/tri_ray.cpp:43-70` | `FIXED` | intersect_triangle and vec3_from_array dereferenced point and vector arguments without checking for null pointers. |
|
||||
| `SEC-0157` | **Sev 2** | Divide by Zero / NULL Pointer Dereference | `src/libbg/util.c:50-145` | `FIXED` | coplanar_2d_coord_sys scaled origin by 1.0/n without verifying n >= 3, leading to division by zero if n <= 0 and undefined behavior for degenerate point sets. coplanar_3d_to_2d and coplanar_2d_to_3d lacked null checks on pointer parameters and count validation. |
|
||||
| `SEC-0158` | **Sev 3** | NULL Pointer Dereference / Deprecated Keyword | `src/libbg/aabb_ray.c:31-143` | `FIXED` | bg_ray_invdir lacked null check on dir; bg_isect_aabb_ray lacked null checks on invdir, aabb_min, aabb_max, and opt; wrote into *r_min and *r_max without verifying destination pointers were non-null; used deprecated register storage class keywords. |
|
||||
| `SEC-0159` | **Sev 3** | Validation Flaw | `src/libbg/obr.cpp:95-100` | `FIXED` | bg_3d_coplanar_obr accepted point count < 3 even though a 3D coplanar coordinate system requires at least 3 points to determine a plane normal. |
|
||||
| `SEC-0160` | **Sev 1** | Buffer Overflow / Stack Buffer Corruption & Divide by Zero | `src/libbg/polygon.c:144-205` | `FIXED` | Operator precedence flaw in bg_3d_polygon_centroid where *cent[1] and *cent[2] evaluate to *(cent[1]) and *(cent[2]), writing 24 and 48 bytes out of bounds past caller's point_t stack/heap memory; uninitialized accumulation; division by zero when polygon is perpendicular to XY or XZ projection planes. |
|
||||
| `SEC-0161` | **Sev 2** | Out-of-bounds Read / Memory Leak | `src/libbg/chull.c:50-185` | `FIXED` | Out-of-bounds read and negative deque index in bg_polyline_2d_chull when vertex count n < 3; permanent memory leaks in bg_3d_coplanar_chull of points_tmp and overwritten hull_2d pointer; missing NULL checks. |
|
||||
| `SEC-0162` | **Sev 2** | Out-of-bounds Read / Memory Leak | `src/libbg/chull2.cpp:50-230` | `FIXED` | Out-of-bounds read and negative deque index in bg_polyline_2d_chull2 for n < 3; permanent memory leak of polyline in bg_2d_chull2; missing NULL parameter checks. |
|
||||
| `SEC-0163` | **Sev 2** | Divide by Zero / Thread-Safety Race Condition | `src/libbg/clip.c:60-140` | `FIXED` | Division by zero in bg_lseg_clip for vertical or horizontal line segments; thread-safety race condition in bg_ray_vclip due to static local variables diff, sv, st, mindist, maxdist causing concurrent raytracing thread conflicts. |
|
||||
| `SEC-0164` | **Sev 2** | Memory Leak / Unchecked Return Value | `src/libbg/polygon_triangulate.cpp:873-970` | `FIXED` | Unchecked return value of fopen in bg_tri_plot_2d causing NULL pointer dereference; permanent memory leaks of holes_array container and tri_out_pts in bg_polygon_triangulate; missing validation on polygon contour points. |
|
||||
| `SEC-0165` | **Sev 2** | NULL Pointer Dereference | `src/libbg/tri_tri.c:180-715` | `FIXED` | bg_tri_tri_isect_with_line unconditionally wrote to *coplanar, *isectpt1, and *isectpt2 without verifying destination pointers were non-null; missing NULL vertex validation across all triangle-triangle intersection routines. |
|
||||
| `SEC-0166` | **Sev 2** | NULL Pointer Dereference / Divide by Zero | `src/libbg/polygon_op.cpp:45-470` | `FIXED` | Unchecked NULL pointer dereferences in bg_find_polygon_area, bg_polygons_overlap, load_polygon, and clipping routines; potential division by zero on zero scale factor. |
|
||||
| `SEC-0167` | **Sev 2** | Integer Underflow / Out-of-bounds Read | `src/libbg/polygon_point_in.c:40-51` | `FIXED` | bg_pnt_in_polygon underflows j = nvert - 1 when nvert == 0 and allows nvert < 3 which is geometrically invalid for polygons; missing NULL pointer checks on pnts and test. |
|
||||
| `SEC-0168` | **Sev 3** | Out-of-bounds Read / Degenerate Buffer Access | `src/libbg/chull3d.cpp:115-210` | `FIXED` | bg_3d_chull and bg_3d_chull2 did not check for empty vertexBuffer or undersized indexBuffer before allocating and indexing; out-of-bounds access in bg_3d_chull2 if face index exceeded vmap size. |
|
||||
| `SEC-0169` | **Sev 3** | Spatial Partitioning Stride Corruption / Resource Leak | `src/libbg/vert_tree.c:140-180, 260-430` | `FIXED` | Stride indexing corruption in bg_vert_tree_add_w_norm where vertex coordinate data was accessed with stride 3 instead of stride 6 (ptr->vleaf.index * 3 vs index * 6), causing spatial partitioning corruption and reading wrong coordinate/normal data; permanent memory leaks in bg_vert_tree_destroy which failed to free the_array when the_tree was NULL and failed to free the bg_vert_tree container structure. |
|
||||
| `SEC-0170` | **Sev 2** | Truncated Integer Division / Overflow | `src/libbg/decimate.cpp:55-70, 160-175` | `FIXED` | Truncated integer division in trimesh_decimate_simple (1/cbin.size()) where 1 / cbin.size() evaluated to integer 0 for any bin with >1 point, collapsing the point accumulator to world origin [0,0,0] instead of the bin centroid; missing n_ifaces integer overflow guard. |
|
||||
| `SEC-0171` | **Sev 2** | Out-of-bounds Read / Unhandled Exception | `src/libbg/delaunator.hpp:40-55, 240-305` | `FIXED` | Out-of-bounds vector read in sum() on empty vector (indexing x[0]); out-of-bounds vector read and crash in Delaunator constructor when n < 3 or when seed points i0 or i1 are uninitialized (accessing coords[2 * INVALID_INDEX]); unhandled exception in bg_polygon_triangulate when Delaunator encounters degenerate collinear input. |
|
||||
| `SEC-0172` | **Sev 2** | Unchecked Error Code / Parameter Validation | `src/libbg/ballpivot.cpp:30-75` | `FIXED` | Unchecked negative return code in bg_3d_ballpivot (if (nfaces == 0) instead of if (nfaces <= 0)), allowing negative face count to be passed into bg_trimesh_3d_gc; missing validation for radii_cnt < 0 or radii_cnt > 0 with NULL radii; missing initial NULL assignment to output pointers. |
|
||||
| `SEC-0173` | **Sev 1** | Unchecked File Operation / Null Dereference | `src/libbg/RTree.h:465-480, 1740-1800` | `FIXED` | Unchecked fopen() return value in RTree::plot() and RTree::plot2d() leading to NULL pointer dereference on file write failure; missing NULL check on filename in RTFileStream::OpenRead and RTFileStream::OpenWrite; unguarded VertexDataSource count on NULL pointer in QuickHull.hpp. |
|
||||
| `SEC-0174` | **Sev 1** | Defensive Parameter Validation | `src/libbg/polygon_triangulate.cpp:560-585` | `FIXED` | Missing parameter validation in bg_detria for faces, num_faces, poly, poly_pnts, pts, holes_array, holes_npts, and steiner, which could cause segmentation faults when called with NULL or undersized inputs. |
|
||||
| `SEC-0175` | **Sev 3** | Pointer Corruption / Memory Leak / Logic Error | `src/libbg/trimesh.cpp:368-379, 458-465, 754, 789` | `FIXED` | In get_unmatched_edges, &unmatched was passed instead of unmatched to bg_trimesh_unmatched_edges with bg_trimesh_edge_gather, corrupting pointer memory; unmatched->count was used uninitialized in bu_calloc; edge_list was leaked permanently. In bg_trimesh_hanging_nodes, unmatched was leaked on all paths and memcpy was undersized (num_edges * 2 bytes instead of num_edges * 2 * sizeof(int)). In bg_trimesh_solid, a false positive solid result occurred when unmatched edges were zero but misoriented or excess edges existed, leaking memory and passing NULL to memcpy. |
|
||||
| `SEC-0176` | **Sev 2** | Out-of-Bounds Memory Access / Buffer Overflow | `src/libbg/trimesh.cpp:812, 840-848, 876-878` | `FIXED` | Missing vertex index bounds validation in bg_trimesh_aabb, bg_trimesh_area, and bg_trimesh_volume allowed out-of-bounds reads into point array p and out-of-bounds writes into visit_vert bitvector when called with corrupted or invalid mesh face data. |
|
||||
| `SEC-0177` | **Sev 2** | Logic Error / Inverted Topology Map | `src/libbg/trimesh_diff.cpp:67-77, 206-255, 313-348` | `FIXED` | In bg_trimesh_diff, ind_map_1 and ind_map_2 inverted the mapping from original to sorted vertex indices (ind_map[i] = orig_ind instead of ind_map[orig_ind] = i), and tri_2 indexed with f1 instead of f2, ignoring mesh 2 face data; bg_trimesh_hash had the same mapping inversion and an early break in its minimum vertex search loop; dbl_clamp could trigger float overflow on non-positive tolerance. |
|
||||
| `SEC-0178` | **Sev 2** | Unchecked Exception / Memory Leak / Input Validation | `src/libbg/spsr.cpp:52-54, 105-178` | `FIXED` | In bg_3d_spsr, missing parameter validation on points, normals, and face pointers allowed NULL pointer dereferences; num_input_pnts < 3 caused solver failures; negative cnt in PtStream caused unsigned overflow; unhandled C++ exceptions escaping the extern C boundary leaked implicit solver memory and aborted the program. |
|
||||
| `SEC-0179` | **Sev 2** | Unchecked File Operation / Null Pointer Dereference / Division by Zero | `src/libbg/trimesh_isect.cpp:56-74, 95-245, trimesh_plot3.cpp:82, 351-372` | `FIXED` | In trimesh_isect.cpp, plot_faces called pl_color on unchecked fopen() return, causing NULL pointer dereference on file write failure; bg_trimesh_isect failed to validate vertex indices in faces_1 and faces_2 against vertex counts, risking OOB access, and never assigned output intersecting faces. In trimesh_plot3.cpp, pntset_2d_plot3 used bitwise OR (!p | !c); polyline_2d_plot3 allowed division by zero on scale <= 0.0 and loop condition i < xy.size() - 1 dropped the last vertex before closing. |
|
||||
| `SEC-0180` | **Sev 1** | Input Validation / Integer Overflow / Exception Safety | `src/libbg/trimesh_remesh.cpp:82-87, trimesh_repair.cpp:126-131, trimesh_split.cpp:94-192, trimesh_sync.cpp:122` | `FIXED` | Missing vertex index validation, integer overflow guards on face counts / allocation sizes, and unhandled C++ exceptions escaping extern C functions in bg_trimesh_remesh, bg_trimesh_repair, bg_trimesh_separate, bg_trimesh_split, and bg_trimesh_sync. |
|
||||
| `SEC-0181` | **Sev 1** | Undefined Behavior / Data Loss / Out-of-Bounds Memory Access | `src/libbg/GTE/Mathematics/TriMesh.h:208-212, 536-580, 595-650, 715-775` | `FIXED` | status(EdgeHandle e) used reinterpret_cast<EdgeStatus&> on std::vector<bool>::operator[] proxy bit-reference yielding undefined behavior; TriMesh::garbage_collection() wiped face connectivity before reading vertices destroying active geometry; multiple handle and iterator methods lacked index bounds validation. |
|
||||
| `SEC-0182` | **Sev 2** | Input Validation / Integer Overflow / Denial of Service | `src/libbg/GTE/Mathematics/BotSmooth.h:85-115, BotSubdivide.h:48-95, 330-360` | `FIXED` | Unchecked face vertex indices allowed out-of-bounds reads into vertex coordinate arrays in gte_bot_smooth and gte_bot_subdivide; unconstrained subdivision recursion levels allowed exponential memory allocation and integer overflow. |
|
||||
| `SEC-0183` | **Sev 2** | Input Validation / Division by Zero / Matrix Solvability | `src/libbg/GTE/Mathematics/LSCMParameterization.h:96-120, 160-220, 275-310` | `FIXED` | Missing vertex index bounds checking on boundaryIndices, interiorIndices, and triangle vertex references when indexing vertices3D in MapBoundaryToCircle and Parameterize; unchecked linear system matrix dimensions could lead to division by zero or invalid memory access in SolveSymmetricCG. |
|
||||
| `SEC-0184` | **Sev 2** | Out-of-Bounds Memory Access / Input Validation | `src/libbg/GTE/Mathematics/MeshHoleFilling.h:275-320, 520-560, MeshPreprocessing.h:130-155, 225-255` | `FIXED` | Unchecked triangle vertex indices allowed out-of-bounds reads in ComputeEarScore3D, ComputeTriangulationArea, TriangulateHoleLSCM, and MeshPreprocessing::ComputeTriangleArea / ComputeSignedVolume / RemoveSmallComponents. |
|
||||
| `SEC-0185` | **Sev 3** | Null Pointer Dereference / Out-of-Bounds Array Access | `src/libbg/GTE/Mathematics/MeshQuality.h:230-236, MeshValidation.h:122-138, 220-250, MeshRepair.h:200-215, 430-495, 600-630, 990-1005` | `FIXED` | MeshQuality::ComputeTriangleRaw lacked null pointer validation for raw vertex pointers; MeshValidation::HasSelfIntersections and TriangleBoxesOverlap lacked empty mesh and vertex index bounds validation; MeshRepair lacked vertex index bounds validation in computeTotalArea, DetectIsolatedVertices, ColocateVertices, RelativeOrientation, Dissociate, and RemoveIsolatedVertices. |
|
||||
| `SEC-0186` | **Sev 2** | Unsigned Integer Underflow / Out-of-Bounds Memory Access | `src/libbg/tests/polygon_op.c:55-80, 240-270` | `FIXED` | In _bg_polygon_diff, offset calculation size_t p2_ind = ((offset + j) >= c1->num_points) ? (j - offset) : (offset + j); produces an unsigned integer underflow when j < offset, wrapping p2_ind to SIZE_MAX and causing an out-of-bounds array access. In addition, unvalidated dcr2 dereferencing could crash on empty polygons, and plot_files contained a contour array dimension mismatch. |
|
||||
| `SEC-0187` | **Sev 2** | Stack Buffer Overflow / Potential Null Pointer Dereference | `src/libbg/tests/bgtester.c:85-115, 230-260` | `FIXED` | In parse_case, parameter arrays d, l, i, u were fixed 50-element stack buffers populated in a while loop without bounds checking, allowing stack buffer overflows on inputs exceeding 50 parameters. In main, token strings returned by strtok were dereferenced without checking for NULL. |
|
||||
| `SEC-0188` | **Sev 3** | Null Pointer Dereference / Logical Indexing Flaw | `src/libbg/tests/chull.c:40-70, obr.c:45-75` | `FIXED` | In plot2d_chull, plot_chull3d, and plot_obr, fopen results were passed directly to pl_color and fclose without NULL verification, risking null pointer crashes if file creation failed. Additionally, plot2d_chull indexed pnt_array[i][0] when closing the polygon loop instead of pnt_array[0][Y]. |
|
||||
| `SEC-0189` | **Sev 3** | Division by Zero / Unchecked Parsing / Missing Pointer Validation | `src/libbg/tests/plane_dist.c:35-50, lseg_pt.c:45-65, geogram_optimizer.cpp:55-80` | `FIXED` | In plane_dist.c, relative error calculation performed division by expected_return without checking for zero, resulting in division by zero (NaN/Inf). In lseg_pt.c, sscanf return counts were unchecked, allowing uninitialized stack values to be used. In geogram_optimizer.cpp, converged_optimizer was dereferenced without checking for NULL. |
|
||||
| `SEC-0190` | **Sev 3** | Resource Leak / Memory Management | `src/libbg/tests/poly2tri.c:110-180, chull.c:120-170, chull3d.c:70-130` | `FIXED` | Dynamically allocated vertex, face, hole, and output polygon arrays allocated via bu_calloc/bu_malloc in poly2tri.c, chull.c, and chull3d.c were never freed prior to test completion or return, resulting in systematic memory leaks. |
|
||||
| `SEC-0191` | **Sev 3** | Resource Leak / Null Pointer Dereference | `src/libbg/tests/polygon_triangulate.c:48-62, 134-150, 184-192, 225-237, 269-281, 298-306` | `FIXED` | Dynamically allocated face index arrays allocated by bg_poly_triangulate and bg_nested_poly_triangulate across all five test cases were never released via bu_free prior to block exit, causing memory leaks. In addition, _tess_report lacked validation guarding against NULL face and point arrays. |
|
||||
| `SEC-0192` | **Sev 2** | Out-of-Bounds Substring / Unchecked Pointer Dereference | `src/libbg/tests/tri_ray_isect.cpp:44-64, tri_tri_isect_coplanar.cpp:41-61` | `FIXED` | In read_point(), if an empty or whitespace-only argument was supplied, find_first_not_of returned std::string::npos, causing substr(sp, ep-sp+1) to throw an unhandled std::out_of_range exception. Additionally, input pointers p and arg were not validated before use, and sscanf return values in main were unchecked. |
|
||||
| `SEC-0193` | **Sev 3** | Uninitialized Stack Memory / Unchecked Input Parsing | `src/libbg/tests/tri_tri_isect.c:31-66, tri_closest_pt.c:43-53` | `FIXED` | In tri_tri_isect.c, stack variables f1 and f2 were left uninitialized in declaration float f1, f2, f3 = 0.0;, and sscanf return counts were unchecked across all coordinate arguments in tri_tri_isect.c and tri_closest_pt.c, risking calculation using uninitialized stack coordinates upon malformed input. |
|
||||
| `SEC-0194` | **Sev 3** | Null Pointer Dereference Guard / Code Quality | `src/libbg/tests/trimesh_sync.c:109-130, tri_area.c:49-53` | `FIXED` | In trimesh_sync.c, error reporting function parrays() dereferenced ff and ctrl pointers without verifying that they were non-NULL, risking null pointer dereferences during error handling. In tri_area.c, an extraneous duplicate semicolon was cleaned up. |
|
||||
| `SEC-0195` | **Sev 2** | Out-of-Bounds Memory Access / Buffer Overflow | `src/libbg/geogram/NL/nl_matrix.c:765-780` | `FIXED` | In nlSparseMatrixConstruct, the row array was allocated with capacity m (NL_NEW_ARRAY(NLRowColumn, m)), but the row initialization loop mistakenly iterated up to n (for (i=0; i<n; i++)). If the column count n exceeded the row count m, this resulted in an out-of-bounds write past the allocated row buffer; if n < m, rows from n to m-1 remained uninitialized. |
|
||||
| `SEC-0196` | **Sev 1** | Logic Error / Broken Comparator | `src/libbg/geogram/NL/nl_matrix.c:132-143` | `FIXED` | In nlCoeffCompare, the comparator callback returned (((NLCoeff*)(p2))->index < ((NLCoeff*)(p1))->index), returning only 0 or 1. It violated strict weak ordering required by qsort/bu_sort (never returning negative values when p1 < p2), risking non-deterministic sort order or sorting anomalies. |
|
||||
| `SEC-0197` | **Sev 2** | Format String / Type Mismatch & Division by Zero | `src/libbg/geogram/NL/nl_blas.c:1440-1455, 1495-1510` | `FIXED` | In host_blas_show_stats, nlBlasGFlops() returns a double, but was passed to nl_printf using %d format specifier, risking register/stack corruption on 64-bit platforms. Furthermore, nlBlasGFlops() divided by elapsed_time without checking for zero elapsed time. |
|
||||
| `SEC-0198` | **Sev 2** | Divide-by-Zero / Floating Point Exception | `src/libbg/geogram/NL/nl_api.c, src/libbg/geogram/NL/nl_preconditioners.c:nl_api.c:660-675, nl_preconditioners.c:110-130, 215-265` | `FIXED` | In nlNormalizeRow, the normalization divided by vector norm without checking if the norm was zero, leading to division by zero on degenerate rows. In Jacobi and SSOR preconditioners (nlNewJacobiPreconditioner, nlSparseMatrixMultLowerInverse, nlSparseMatrixMultUpperInverse), diagonal entries were divided without guards against zero diagonal entries. |
|
||||
| `SEC-0199` | **Sev 1** | Macro Hazard / Null Pointer Dereference Guard | `src/libbg/geogram/NL/nl_private.h, src/libbg/geogram/NL/nl_os.c, src/libbg/geogram/NL/nl_amgcl.cpp:nl_private.h:288-300, nl_os.c:55-135, nl_amgcl.cpp:178-195` | `FIXED` | NL_DELETE and NL_DELETE_ARRAY macros expanded to multiple unbracketed statements (free(x); x = NULL), creating dangerous syntax and logic errors when used inside unbraced single-line conditionals. Error reporting and assertion handlers in nl_os.c lacked NULL checks on function pointers and format arguments. AMGCL solver interface in nl_amgcl.cpp lacked NULL checks on context, matrices, and vectors. |
|
||||
| `SEC-0200` | **Sev 3** | Buffer Overflow / Logic Error in Dimension Check | `src/libbg/geogram/basic/attributes.cpp:390-405` | `FIXED` | In AttributesManager::copy_attribute, the compatibility check between existing attribute and destination attribute tested if ((store->size() != new_store->size()) && (store->dimension() != new_store->dimension()) && (store->element_size() != new_store->element_size())) using logical AND (&&) instead of logical OR (||). If the attributes had matching dimensions but differing element counts, the condition evaluated to false, allowing memcpy to copy an oversized source buffer into an undersized destination buffer, causing a critical heap buffer overflow. |
|
||||
| `SEC-0201` | **Sev 2** | Memory Leak / Missing Destructor & Dangling Pointer | `src/libbg/geogram/basic/thread_sync.h:150-227` | `FIXED` | BasicSpinLockArray allocated heap memory via new spinlock[size_in], but lacked a destructor (~BasicSpinLockArray()), causing all allocated spinlock arrays to be leaked upon destruction. Furthermore, BasicSpinLockArray::clear() deleted the array without resetting size_ to 0 or spinlocks_ to nullptr, and CompactSpinLockArray::clear() did not reset spinlocks_ to nullptr, leaving dangling pointers. |
|
||||
| `SEC-0202` | **Sev 2** | Memory Management Flaw / Out-of-Bounds Read & Write | `src/libbg/geogram/basic/packed_arrays.cpp, src/libbg/geogram/basic/packed_arrays.h:packed_arrays.cpp:90-185, packed_arrays.h:160-165` | `FIXED` | In PackedArrays, calloc return values were not checked for allocation failure. In resize_array, realloc(ZV_[array_index], 0) was invoked when shrinking to <= Z1_block_size_, risking platform-dependent memory leaks or undefined behavior, and the realloc return was directly assigned without failure handling. Array accessors (get_array, set_array, resize_array, array_size) lacked bounds checks on array_index in release mode. |
|
||||
| `SEC-0203` | **Sev 2** | Integer Underflow & Unbounded Stack Allocation | `src/libbg/geogram/basic/parallel.cpp, src/libbg/geogram/basic/permutation.h, src/libbg/geogram/basic/attributes.cpp:parallel.cpp:67-85, permutation.h:158-240, attributes.cpp:160-180` | `FIXED` | In parallel_for, if from >= to, unsigned integer subtraction to - from underflowed to a massive positive number (~4 billion), causing thread spawning loops with out-of-bounds tasks. In Permutation::apply and AttributeStore::swap_items, BRLCAD_ALLOCA was invoked unconditionally on element sizes, risking stack overflow on large elements. In Permutation::apply(vector<T>&, ...), mismatch between data size and permutation size was not checked, violating documented contract and causing out-of-bounds access. |
|
||||
| `SEC-0204` | **Sev 1** | Macro Precedence Hazards & Divide-by-Zero / Floating-Point Exception | `src/libbg/geogram/basic/assert.h, src/libbg/geogram/basic/memory.h, src/libbg/geogram/basic/geometry_nd.h, src/libbg/geogram/basic/rationalg.h, src/libbg/geogram/basic/vecg.h:assert.h:145-215, memory.h:390-485, geometry_nd.h:215-295, rationalg.h:540-550, vecg.h:180-195` | `FIXED` | Assertions in assert.h were defined with raw braces { ... } rather than do { ... } while(0), causing dangling-else and syntax errors in conditional contexts. geo_aligned_alloca macro parameter was unparenthesized. Memory::aligned_allocator::allocate lacked integer overflow check on size * sizeof(T). triangle_area lacked max(A2, 0.0) guard causing sqrt(negative) NaNs, and triangle_circumcenter divided by determinant without zero check. rationalg::estimate() divided by denominator without zero check. vecng initializer_list constructor lacked bounds check on iteration count. |
|
||||
| `SEC-0205` | **Sev 2** | Out-of-Bounds Memory Access & Integer Overflow | `src/libbg/geogram/mesh/index.h, src/libbg/geogram/mesh/mesh.h, src/libbg/geogram/mesh/mesh.cpp:index.h:70-130, mesh.h:200-475, mesh.cpp:115-460` | `FIXED` | In MeshCells::pop(), cell_ptr_[nb()-1] was accessed unconditionally; simplicial meshes store an empty or single-element cell_ptr_, resulting in heap out-of-bounds reads. In MeshVertices::copy, point_ptr(0) was called when rhs.nb() == 0, accessing beyond empty buffers. In Mesh::get_subelements_by_type and get_subelements_by_index, invalid queries dereferenced null pointers *(MeshSubElementsStore*)nullptr. Index classes left buffer arrays uninitialized in default constructors. create_sub_elements and reserve lacked integer multiplication overflow guards. In connect_tets and connect, corrupt facet/cell vertex indices were not validated against vertices_.nb(). |
|
||||
| `SEC-0206` | **Sev 2** | Divide-by-Zero & Out-of-Bounds Vector Access | `src/libbg/geogram/mesh/mesh_AABB.h, src/libbg/geogram/mesh/mesh_AABB.cpp:mesh_AABB.h:45-1250, mesh_AABB.cpp:35-180` | `FIXED` | In ray_triangle_intersection, 1.0 / det was calculated prior to checking whether fabs(det) >= 1e-20, causing floating-point division by zero and NaN/Inf propagation on rays coplanar to triangle planes. Querying or intersecting AABB trees built on empty meshes (nb() == 0) accessed bboxes_[1] out-of-bounds and caused infinite recursion in max_node_index. |
|
||||
| `SEC-0207` | **Sev 1** | Divide-by-Zero & Denial of Service / Process Abort | `src/libbg/geogram/mesh/mesh_geometry.h, src/libbg/geogram/mesh/mesh_geometry.cpp, src/libbg/geogram/mesh/mesh_halfedges.cpp:mesh_geometry.h:210-240, mesh_geometry.cpp:80-160, mesh_halfedges.cpp:60-145` | `FIXED` | mesh_facet_center and mesh_cell_center divided by corner/vertex counts without checking for empty facets/cells (0 count). In mesh_geometry.cpp, normalize was called on zero vectors, and bounding box functions did not validate null output pointers or zero-vertex meshes. In MeshHalfedges, border and vertex traversals on non-manifold or cyclical meshes aborted the process via geo_assert_not_reached or geo_assert(count < 10000) instead of gracefully failing. |
|
||||
| `SEC-0208` | **Sev 2** | Out-of-Bounds Memory Access, Stack Exhaustion & Process Abort | `src/libbg/geogram/mesh/mesh_repair.cpp, src/libbg/geogram/mesh/mesh_preprocessing.h, src/libbg/geogram/mesh/mesh_preprocessing.cpp, src/libbg/geogram/mesh/mesh_topology.cpp:mesh_repair.cpp:65-175, 490-590, 665-685, 820-840, 920-1010, 1145-1215; mesh_preprocessing.h:77; mesh_preprocessing.cpp:65-135; mesh_topology.cpp:48-105` | `FIXED` | In repair_connect_facets, v2c[v1], c2f[c2], and next_c_around_v[c] were indexed without validating vertex/corner indices against mesh element counts, causing out-of-bounds array reads. facet_is_degenerate and normalize_facet_vertices_order performed unbounded BRLCAD_ALLOCA stack allocations for vertex arrays on arbitrary polygonal facets without heap fallback, causing stack overflow vulnerabilities. find_corner, repair_propagate_orientation, and SimplePriorityQueue::pop aborted the process on malformed topological meshes via geo_assert_not_reached. mesh_colocate_vertices_no_check indexed old2new without bounds checks. In mesh_preprocessing.cpp and mesh_topology.cpp, empty meshes or unbound attributes resulted in out-of-bounds indexing in component traversal and signed volume calculation. |
|
||||
| `SEC-0209` | **Sev 2** | Divide-by-Zero & Out-of-Bounds Buffer Indexing | `src/libbg/geogram/mesh/mesh_reorder.cpp, src/libbg/geogram/mesh/mesh_remesh.cpp:mesh_reorder.cpp:280-295, 430-445, 570-585, 935-945, 1115-1175; mesh_remesh.cpp:75-80, 125-140, 150-165, 205-255, 285-295, 470-505` | `FIXED` | In mesh_reorder.cpp, Base_fcmp::center and Base_ccmp::center computed 1.0 / double(nb_vertices) without checking nb_vertices == 0, causing floating-point division by zero; Base_tcmp accessed 4 cell vertices without validating vertex count. In mesh_remesh.cpp, remesh_smooth and mesh_adjust_surface crashed or had undefined behavior on empty meshes or meshes with dimension < 3; mesh_adjust_surface divided by double(d) on facets with 0 vertices; create_ribbon_on_border called normalize on zero-length normal vectors, causing NaNs. |
|
||||
| `SEC-0210` | **Sev 2** | Divide-by-Zero & Buffer Overflow | `src/libbg/geogram/mesh/mesh_sampling.h:mesh_sampling.h:68-95, 120-165, 215-265, 285-335` | `FIXED` | In mesh_generate_random_samples_on_surface and mesh_generate_random_samples_in_volume, division by total area (Atot) and total volume (Vtot) occurred without checking Atot <= 0.0 or Vtot <= 0.0, resulting in division by zero and NaN sample coordinates on degenerate meshes. mesh_facet_mass and mesh_tetra_mass lacked bounds checking on facet/cell vertex counts and attribute arrays, potentially reading out of bounds. |
|
||||
| `SEC-0211` | **Sev 2** | Out-of-Bounds Memory Access & Assertion Abort | `src/libbg/geogram/delaunay/delaunay.cpp, src/libbg/geogram/delaunay/delaunay.h:delaunay.cpp:115-180, 245-290; delaunay.h:200-245` | `FIXED` | In delaunay.cpp (update_v_to_cell, update_cicl, get_neighbors_internal, save_histogram), missing bounds checks on vertex and cell indices allowed out-of-bounds writes to v_to_cell_ and cicl_ on corrupted mesh topology or NO_INDEX vertices. In save_histogram, an off-by-one check (histogram.size() <= N instead of < N) allowed out-of-bounds array writes. In delaunay.h, geo_assert_not_reached() was called on unlinked cells causing process crashes instead of graceful failure. |
|
||||
| `SEC-0212` | **Sev 2** | Stack Exhaustion & Unbounded Allocation | `src/libbg/geogram/delaunay/delaunay_nn.cpp:delaunay_nn.cpp:120-195, 230-310` | `FIXED` | In delaunay_nn.cpp (enlarge_neighborhood, store_neighbors_CB, get_neighbors_internal), unbounded BRLCAD_ALLOCA was used for neighbor candidate and distance arrays proportional to requested neighbor counts. High neighbor counts or deep recursion could exhaust thread call stacks causing stack overflow crashes. Additionally, float equality comparison against 0.0 triggered compiler warnings. |
|
||||
| `SEC-0213` | **Sev 2** | Stack Exhaustion & Unbounded Allocation | `src/libbg/geogram/points/colocate.cpp:colocate.cpp:85-150` | `FIXED` | In Colocate::find_nearest_neighbors, unbounded BRLCAD_ALLOCA was invoked per point for neighbor query arrays based on requested neighbor counts, creating risk of stack overflow on large neighbor queries. |
|
||||
| `SEC-0214` | **Sev 3** | Uninitialized Memory, Out-of-Bounds Access & Infinite Recursion | `src/libbg/geogram/points/kd_tree.cpp, src/libbg/geogram/points/kd_tree.h:kd_tree.h:110-145; kd_tree.cpp:180-260, 410-480, 520-600` | `FIXED` | In kd_tree.h, KdTree::NearestNeighbors constructor initialized loop condition with nb_neighbors (which was 0) instead of nb_neighbors_max, leaving neighbor index and distance arrays uninitialized and leaking memory to user callers via copy_to_user(). In kd_tree.cpp, AdaptiveKdTree::split_kd_node failed to clamp split point m, resulting in child nodes duplicating parent intervals [b, e) and causing infinite recursion and call stack exhaustion. KdTree::get_nearest_neighbors_leaf used fixed-size stack arrays local_idx[MAX_LEAF_SIZE] without checking e - b <= MAX_LEAF_SIZE. BalancedKdTree::get_node and AdaptiveKdTree::get_node lacked bounds checks on node index n. |
|
||||
| `SEC-0215` | **Sev 2** | Out-of-Bounds Access & Assertion Abort | `src/libbg/geogram/points/nn_search.cpp, src/libbg/geogram/points/nn_search.h:nn_search.h:70-90; nn_search.cpp:45-75` | `FIXED` | In nn_search.cpp (get_nearest_neighbors), query point index q_index was not validated against nb_points(), risking out-of-bounds point access. In nn_search.h (get_nearest_neighbor), geo_assert(result < nb_points()) triggered process abort when no neighbors were found on empty point sets instead of returning NO_INDEX. |
|
||||
| `SEC-0216` | **Sev 3** | Memory Corruption & Heap Buffer Under-Allocation | `src/libbg/geogram/numerics/multi_precision.cpp, src/libbg/geogram/numerics/multi_precision.h:multi_precision.h:115-125; multi_precision.cpp:80-145, 595-610` | `FIXED` | In multi_precision.cpp, Pools allocator used slot sizes smaller than sizeof(void*) on 64-bit platforms, causing heap corruption when casting to freelist pointers; missing null check in free; missing integer overflow guard on expansion capacity. |
|
||||
| `SEC-0217` | **Sev 2** | Out-of-Bounds Memory Access & Integer Underflow | `src/libbg/geogram/numerics/multi_precision.cpp:multi_precision.cpp:215-230, 240-275, 305-330, 680-720` | `FIXED` | In multi_precision.cpp, compress_expansion underflowed index m on lengths <= 1, causing out-of-bounds heap memory access; scale_expansion_zeroelim, fast_expansion_sum_zeroelim, fast_expansion_diff_zeroelim read out-of-bounds on zero-length expansions; assign_sq_dist and assign_dot_at underflowed dimension dim == 0 causing infinite recursion. |
|
||||
| `SEC-0218` | **Sev 2** | Assertion Failure Denial-of-Service Crashes | `src/libbg/geogram/numerics/predicates.cpp, src/libbg/geogram/numerics/PCK.h:PCK.h:170-175; predicates.cpp:445-460, 620-635, 960-975, 1130-1145, 1395-1410, 1535-1550` | `FIXED` | In predicates.cpp, exact predicate implementations aborted via SIGABRT on geo_assert(Delta_sign != ZERO) on degenerate/collinear inputs instead of gracefully returning ZERO; PCK.h SOS() asserted on invalid mode. |
|
||||
| `SEC-0219` | **Sev 2** | Mathematical Logic Flaw & Missing Pointer Validation | `src/libbg/geogram/numerics/predicates.cpp, src/libbg/geogram/numerics/predicates.h, src/libbg/geogram/numerics/PCK.cpp:PCK.cpp:25-35; predicates.h:260-275; predicates.cpp:1640-2260` | `FIXED` | In predicates.cpp (PCK::dot_3d), det_3d_filter was erroneously invoked instead of dot_3d_filter; geometric predicates lacked null pointer checks on double* coordinate inputs; percent() lacked division by zero protection. |
|
||||
| `SEC-0220` | **Sev 3** | Use-After-Free / Dangling Pointer & Missing Null Validation | `src/libbg/geogram/voronoi/RVD.cpp:1754-1775, 1810-1855, 2480-2500, 2535-2587` | `FIXED` | In prepare_projection(), mesh_vertices_ held a raw pointer to a local vector<double> destroyed upon function return, causing project_points_on_surface() to read through a dangling pointer (use-after-free). In RestrictedVoronoiDiagram::create, delaunay was dereferenced prior to checking for null pointer. |
|
||||
| `SEC-0221` | **Sev 2** | Buffer Overflow, Integer Shift Overflow, Unchecked Realloc & Vector Stack Underflow | `src/libbg/geogram/voronoi/generic_RVD_utils.h, src/libbg/geogram/voronoi/generic_RVD_vertex.h:generic_RVD_utils.h:45-55, 275-290, 345-385; generic_RVD_vertex.h:175-195, 240-260, 270-300, 725-770` | `FIXED` | In generic_RVD_utils.h, VectorStack::pop() called pop_back() on empty vectors causing out-of-bounds underflow; array_capacity computed 1 << (result - 1) with 32-bit signed shift that overflowed on large capacities; and insert() directly reassigned realloc return pointers without failure validation. In generic_RVD_vertex.h, small_set appended past capacity DIM without bounds checks; PointAllocator lacked chunk allocation failure handling and bounds checks. |
|
||||
| `SEC-0222` | **Sev 2** | Denial-of-Service Assertion Aborts & Unchecked Pointer Dereferences | `src/libbg/geogram/voronoi/generic_RVD_cell.cpp, src/libbg/geogram/voronoi/generic_RVD_polygon.cpp, src/libbg/geogram/voronoi/RVD_callback.cpp, src/libbg/geogram/voronoi/RVD.cpp:generic_RVD_cell.cpp:635-645, 1020-1040; generic_RVD_polygon.cpp:520-530; RVD_callback.cpp:80-95; RVD.cpp:1620-1695, 2410-2420, 2580-2585` | `FIXED` | In side_exact, initialize_from_surface_mesh, triangulate_polygon, run_thread, and RestrictedVoronoiDiagram::create, assertions geo_assert and geo_assert_not_reached were triggered on non-simplex facets, unexpected topology, or unhandled dimensions, terminating the process via SIGABRT. |
|
||||
| `SEC-0223` | **Sev 2** | Out-of-Bounds Access, Missing Null Guards & Zero Division | `src/libbg/geogram/voronoi/CVT.cpp, src/libbg/geogram/voronoi/CVT.h:CVT.h:120-140, 195-215; CVT.cpp:60-80, 135-155, 175-195, 230-260, 310-340, 360-390` | `FIXED` | In CVT.cpp and CVT.h, constructors and member methods accepted Mesh* and double* pointers without null validation, accessed empty embedding vectors, and performed unvalidated indexing and division when dimension_ or point counts were zero. |
|
||||
| `SEC-0224` | **Sev 2** | Division by Zero, Out-of-bounds Vector Access & Dimension Validation | `src/libbg/geogram/third_party/LBFGSpp/include/LBFGS.h:LBFGS.h:170-175, 230-240; LBFGSB.h:205-215; BFGSMat.h:115-125, 270-340, 480-505; BKLDLT.h:80-95, 125-140, 160-175; Cauchy.h:120-145, 175-190; LineSearchMoreThuente.h:34-55, 71-125; LineSearchNocedalWright.h:42-50, 94-98; Param.h:210, 368; SubspaceMin.h:44-58, 134-138` | `FIXED` | In LBFGSpp optimization routines, missing zero guards on matrix determinants, Hessian eigenvalues, line search denominators, and empty input vector dimensions allowed potential divisions by zero, infinite loops, and out-of-bounds array access on degenerate or singular optimization problems. |
|
||||
| `SEC-0225` | **Sev 2** | Out-of-bounds Array Access, Null Dereference, Division by Zero & Traversal Flaw | `src/libbg/geogram/third_party/amgcl/amgcl/adapter/zero_copy.hpp, src/libbg/geogram/third_party/amgcl/amgcl/amg.hpp, src/libbg/geogram/third_party/amgcl/amgcl/backend/builtin.hpp, src/libbg/geogram/third_party/amgcl/amgcl/backend/detail/matrix_ops.hpp, src/libbg/geogram/third_party/amgcl/amgcl/backend/interface.hpp, src/libbg/geogram/third_party/amgcl/amgcl/coarsening/detail/galerkin.hpp, src/libbg/geogram/third_party/amgcl/amgcl/coarsening/plain_aggregates.hpp, src/libbg/geogram/third_party/amgcl/amgcl/coarsening/pointwise_aggregates.hpp, src/libbg/geogram/third_party/amgcl/amgcl/coarsening/smoothed_aggr_emin.hpp, src/libbg/geogram/third_party/amgcl/amgcl/coarsening/smoothed_aggregation.hpp, src/libbg/geogram/third_party/amgcl/amgcl/coarsening/tentative_prolongation.hpp, src/libbg/geogram/third_party/amgcl/amgcl/detail/inverse.hpp, src/libbg/geogram/third_party/amgcl/amgcl/detail/qr.hpp, src/libbg/geogram/third_party/amgcl/amgcl/detail/sort_row.hpp, src/libbg/geogram/third_party/amgcl/amgcl/detail/spgemm.hpp, src/libbg/geogram/third_party/amgcl/amgcl/make_solver.hpp, src/libbg/geogram/third_party/amgcl/amgcl/preconditioner/dummy.hpp, src/libbg/geogram/third_party/amgcl/amgcl/relaxation/spai0.hpp, src/libbg/geogram/third_party/amgcl/amgcl/reorder/cuthill_mckee.hpp, src/libbg/geogram/third_party/amgcl/amgcl/solver/cg.hpp, src/libbg/geogram/third_party/amgcl/amgcl/solver/skyline_lu.hpp, src/libbg/geogram/third_party/amgcl/amgcl/util.hpp, src/libbg/geogram/third_party/amgcl/amgcl/value_type/interface.hpp` | `FIXED` | In AMGCL solver and preconditioner routines, missing bounds checks on row/column indices and negative aggregate IDs allowed out-of-bounds array reads and writes. Missing checks for singular pivots, zero denominators, and zero spectral radius allowed divisions by zero. Unchecked matrix and vector pointers allowed null pointer dereferences. A loop condition logic error in Cuthill-McKee reordering skipped node 0 during graph level set traversal. |
|
||||
| `SEC-0226` | **Sev 2** | Null Pointer Dereference, Division by Zero, Out-of-bounds Array Access | `src/libbrep/BBNode.cpp, src/libbrep/BRNode.cpp, src/libbrep/PullbackCurve.cpp, src/libbrep/Subcurve.cpp, src/libbrep/Subsurface.cpp, src/libbrep/assembly.cpp, src/libbrep/boolean.cpp, src/libbrep/brep_defines.h` | `FIXED` | In libbrep core evaluation, trimming, assembly, and pullback routines, missing null checks on curve, surface, face, and child pointers could result in null pointer dereferences. Missing checks against zero denominators in cubic curve interpolation, knot intervals, Newton solver steps, and basis control ratio calculations could cause division by zero. Edge index parameters in edge merging routines lacked array bounds checks before indexing brep edge tables. |
|
||||
| `SEC-0227` | **Sev 2** | Null Pointer Dereference, Division by Zero, Out-of-bounds Index, Resource Leak | `src/libbrep/px_event.cpp, src/libbrep/ssx_event.cpp, src/libbrep/quality.cpp, src/libbrep/edit.cpp, src/libbrep/debug_plot.cpp` | `FIXED` | In px_event.cpp, Compare() returned inverted null-pointer values and used boolean instead of 3-way integer comparison for sorting. In ssx_event.cpp, DumpSSXEvent() unconditionally dereferenced m_curveA, m_curveB, and m_curve3d without null checks. In quality.cpp, bbox_contains() evaluated an invalid point, and edge quality iteration lacked vertex and trim index bounds validation. In edit.cpp, brep_edge_create() lacked curve/vertex index bounds checks, and calculateTangentVectors(), getPosRoot(), bsplineBasisFuns(), and solveTridiagonalint() had unguarded divisions by potentially-zero denominators. In debug_plot.cpp, write_plot_to_file() used fopen() result without null check. |
|
||||
| `SEC-0228` | **Sev 2** | Null Pointer Dereference, Out-of-bounds Vector Access, Resource Leak | `src/libbrep/cdt/cdt.cpp, src/libbrep/cdt/cdt_util.cpp, src/libbrep/cdt/mesh.cpp, src/libbrep/cdt/ovlps_simple.cpp, src/libbrep/cdt/surf.cpp, src/libbrep/cdt/tri_isect.cpp` | `FIXED` | In cdt.cpp and ovlps_simple.cpp, missing size validation and null pointer checks on bedge_seg_t::uedges() results caused potential out-of-bounds access and null pointer dereference. In mesh.cpp, bedge_seg_t::uedges() lacked trim index bounds checking and null pointer validation. Across mesh.cpp, cdt_util.cpp, tri_isect.cpp, and surf.cpp, pervasive unchecked fopen() return values in debug plot functions caused potential NULL pointer dereferences. |
|
||||
| `SEC-0229` | **Sev 2** | Memory Access Violation, Out-of-bounds Array Access, Memory Leaks, Division by Zero, Null Pointer Dereference | `src/libbrep/shape_recognition/cone.cpp, src/libbrep/shape_recognition/cylinder.cpp, src/libbrep/shape_recognition/pipeline.cpp, src/libbrep/shape_recognition/planar.cpp, src/libbrep/shape_recognition/shape_recognition.cpp, src/libbrep/shape_recognition/sphere.cpp, src/libbrep/shape_recognition/sr_util.cpp, src/libbrep/shape_recognition/torus.cpp` | `FIXED` | In planar.cpp, an off-by-one loop condition j <= array_end - array_start caused out-of-bounds read and write in triangulate_array_with_holes; outer_pt_ind, holes arrays, vert_map, and loop_starts leaked on every triangulation; BU_PTBL_GET dereferenced empty island_children causing null dereference crash; in cylinder.cpp, points[3] was accessed without checking points count > 3, and implicit_plane_ind was indexed without bounds checks; in cone.cpp, loop over cone planes indexed plane 1 when count was 1, and sin(C) was divided without zero checking; in pipeline.cpp, nde array leaked across multiple return paths, and nonplanar_surfaces was dereferenced when empty; in shape_recognition.cpp, unchecked fol_to_i iterator dereference caused crash, subbrep_shoal_data leaked when shoal_csg failed, and face_surface_types and uninserted sb leaked on failure; in sr_util.cpp, BU_PUT for obj->nucleus erroneously freed subbrep_shoal_data with struct csg_obj_params size/tag, and empty face->m_li caused out-of-bounds loop access; in sphere.cpp, a typo c2->IsArc(NULL, &a1) left a2 uninitialized and leaked curve duplicates c1 and c2; in torus.cpp, arc loop leaked curve ecv and ep_normal was incorrectly set to torus.plane.Normal(). |
|
||||
| `SEC-0230` | **Sev 2** | Memory Leaks, Uncontrolled Recursion, Out-of-bounds Array Access, Null Pointer Dereference, Logic Error | `src/libbrep/tools/tools.cpp, src/libbrep/tools/tools_util.cpp, src/libbrep/tests/brep_cdt_hole_face17.c, src/libbrep/tests/brep_cdt_hole_face27.c, src/libbrep/tests/brep_cdt_invalid.cpp, src/libbrep/tests/brep_cdt_mesh.cpp, src/libbrep/tests/assembly.cpp, src/libbrep/tests/ppx.cpp, src/libbrep/tests/pullback_context.cpp, src/libbrep/tests/test_curve_intersect.cpp, src/libbrep/tests/test_point_intersect.cpp` | `FIXED` | In libbrep tools and tests: in tools.cpp, find_next_point placed recursion limit inside else block, causing infinite recursion and stack exhaustion; ON_Curve_Get_Tangent and ON_Curve_Has_Tangent lacked null pointer and direction bounds checks; in ON_Surface_IsStraight, frames[0] and frames[1] were repeatedly indexed instead of frames[i] and frames[j]; in tools_util.cpp, ON_BrepTikz leaked duplicate edge curves on non-linear edges, and lacked null pointer and array bounds checks; in brep_cdt_mesh.cpp, invalid argument count printed usage but proceeded without exiting, dereferencing invalid argv[1]; in brep_cdt_hole_face17.c and brep_cdt_hole_face27.c, multiple heap-allocated arrays leaked on test completion; across test executables, argv[0] was passed to bu_setprogname without validating argc > 0 and argv != NULL. |
|
||||
| `SEC-0231` | **Sev 2** | Infinite Loop Denial of Service, Null Pointer Dereference, Division by Zero, Missing Bounds Validation | `src/libfft/fftfast.c, src/libfft/splitdit.c, src/libfft/ditsplit.c, src/libfft/fftc.c, src/libfft/ifftc.c, src/libfft/splitditc.c, src/libfft/ditsplitc.c, src/libfft/fftest.c` | `FIXED` | In libfft routines: init_sintab infinite loop on invalid size, unchecked calloc returns, cdiv zero division, and missing null pointer and bounds checks across forward/inverse FFT transforms and test generators. |
|
||||
| `SEC-0232` | **Sev 2** | Buffer Overflow, Out-of-Bounds Array Access, Division by Zero & Missing Pointer Validation | `src/libtermio/libtermio.h, src/libtermio/linenoise.hpp` | `FIXED` | In libtermio: terminal parameter arrays sized FOPEN_MAX lacked fd bounds checks, FD_SET lacked fd bounds checks in termio_getch, EditHistoryNext used unbounded strcpy, EditInsert lacked buffer capacity checks, and refresh lines divided by unchecked cols_. |
|
||||
| `SEC-0233` | **Sev 2** | Out-of-Bounds Array Access, Division by Zero, and Missing Pointer Validation | `src/libpc/gecode_librt_test.cpp, src/libpc/solver_test.cpp, src/libpc/vm_test.cpp, src/libpc/domain_constraint_propagator.cpp, src/libpc/cartesian-heart.cpp, src/libpc/gecode_solver_test.cpp` | `FIXED` | In libpc: unchecked point indices in geometry constraint helpers, null dereference in solver test functors and parameter access, zero division in math VM test, and unchecked Space* pointers in domain constraint propagators. |
|
||||
| `SEC-0234` | **Sev 2** | Use-After-Free, Double-Free, Buffer Overflow, and Resource Leaks | `src/nirt/main.cpp, src/nirt/showshot.c` | `FIXED` | In nirt: premature db_close caused use-after-free, double-free on failure cleanup, double pclose/fclose on shared output stream, leaked rt_read_cmd buffers, unbounded rname copy in showshot, and unchecked radius input. |
|
||||
| `SEC-0235` | **Sev 2** | Heap/Stack Buffer Overflow, Pointer Underflow, and Memory Leaks | `src/bwish/cmd.c, src/bwish/input.c, src/bwish/main.c` | `FIXED` | In bwish/btclsh: wrong struct size in historyInit realloc, missing capacity check in history_record_priv, off-by-one read in inputHandler, size_t underflow in processChar, negative pointer arithmetic in editing handlers, and unchecked fd in FD_SET. |
|
||||
| `SEC-0236` | **Sev 2** | Format String Bugs, Division Errors, File Descriptor Leaks, and Bounds Checks | `bench/clean.c, bench/compute.c, bench/run.c, bench/pixcmp.c, bench/benchmark.c` | `FIXED` | In bench suite: vls accumulation bug and memory leak in clean.c, off-by-one element count causing negative division in compute.c, passing bu_vls by value to %s in run.c, argv[1] OOB access and file descriptor leaks in pixcmp.c and benchmark.c. |
|
||||
| `SEC-0237` | **Sev 2** | Buffer Bounds, Resource Leaks, Null Dereferences, and Out-of-Bounds Memory Access | `src/art/tile.cpp, src/art/brlcadplugin.h, src/art/brlcadplugin.cpp, src/art/art.cpp` | `FIXED` | In art Appleseed integration: missing frame/fbp checks and row offset calculation in tile.cpp, missing rt_i_destroy and thread index clamping in brlcadplugin.cpp, leaked ged instances and open dbip in art.cpp, and leaked temporary vls buffers. |
|
||||
| `SEC-0238` | **Sev 2** | Buffer Overflow, Out-of-bounds Array Access, Null Pointer Dereference, and Input Validation | `src/launcher/launcher.c, src/launcher/registry.c, src/launcher/launch.c, src/launcher/fbtext.c, src/launcher/ui_fb.c, src/launcher/ui_text.c` | `FIXED` | In launcher: unchecked argc/argv in main, null pointer dereference in list_apps, unchecked registry growth and bu_dir results, framebuffer vertical row bounds checks in draw_char, and button action index bounds checks in ui_fb.c. |
|
||||
| `SEC-0239` | **Sev 2** | Buffer Overflow, Memory Leaks, Division by Zero, Null Pointer Dereference, and Out-of-Bounds Memory Access | `src/isst/gfile.h, src/isst/gfile.cpp, src/isst/isstgl.h, src/isst/isstgl.cpp, src/isst/main.cpp, src/isst/main_window.cpp, src/isst/isstapp.cpp` | `FIXED` | In isst: uninitialized GFile members and memory leaks in closedb(), static gcvwriter global state, out-of-bounds array write in nmg_to_adrt_internal, out-of-bounds vertex indexing and leaked intern in nmg_to_adrt_regstart, leaked db_path_to_string buffers, uninitialized camera in TIERenderer, division by zero in resize(), null tie dereference in render(), missing render mutex in set_tie(), and unchecked argc/argv in main. |
|
||||
| `SEC-0240` | **Sev 1** | Memory Leaks, Buffer Overflow, Division by Zero, Out-of-bounds Array Access, and Null Pointer Dereferences | `src/libbv/*` | `FIXED` | In libbv: fixed display list and scene object leaks, division by zero in camera and knob math, and array bounds in polygon and clipping routines. |
|
||||
| `SEC-0241` | **Sev 1** | Memory Leaks, Buffer Overflow, Division by Zero, Out-of-bounds Memory Access, and Null Pointer Dereferences | `src/libdm/*` | `FIXED` | In libdm: fixed color map out-of-bounds write risks, integer overflow in getmem, division by zero in reshape/aspect, and resource leaks across display manager backends. |
|
||||
| `SEC-0242` | **Sev 2** | Memory Leaks, Buffer Overflow, Division by Zero, Out-of-bounds Memory Access, and Null Pointer Dereferences | `src/libgcv/*` | `FIXED` | In libgcv: fixed float-to-integer conversion in bottess, uninitialized memory reads in OBJ/PLY plugins, division by zero across converters, and intermediate geometry leaks. |
|
||||
| `SEC-0243` | **Sev 2** | Memory Leaks, Buffer Overflow, Division by Zero, Out-of-bounds Memory Access, and Null Pointer Dereferences | `src/libged (Batch 1)` | `FIXED` | In libged Batch 1: fixed memory leaks and double-free hazards on wdb_put_internal, stack buffer overflow in adc, division by zero across analyze/arot/arrange, and ARS/ARB bounds checks. |
|
||||
| `SEC-0244` | **Sev 2** | Memory Leaks, Buffer Overflow, Division by Zero, Out-of-bounds Memory Access, and Null Pointer Dereferences | `src/libged (Batch 2: bot, brep)` | `FIXED` | In libged Batch 2: fixed rt_db_internal initialization/free leaks and double-frees, array bounds on vertices/faces/trims, division by zero in normals/decimation/scale, and NULL pointer checks across bot and brep subcommands. |
|
||||
| `SEC-0245` | **Sev 2** | Memory Leaks, Double-Free, Division by Zero, Infinite Loop, Array Out-of-Bounds, and File Descriptor Leaks | `src/libged (Batch 3: cc, check, coil, color, columns, comb, comb_std, combmem, concat, constraint, copymat, cpi, dbi_state, debug2c)` | `FIXED` | In libged Batch 3: fixed double-frees following rt_db_put_internal and freed internal representation on db_diradd failures across cc, cpi, comb, comb_std, and copymat; added NULL guards, division-by-zero checks on units, heap VLS frees, and plot file descriptor leak fixes in check; plugged memory leaks of sections, validated sscanf, and prevented division by zero in coil; fixed cnt != 5 typo and temp file leak in color; added NULL checks in columns; freed rt_tree_array in combmem and fixed infinite loop on paren evaluation in comb_std; guarded argv bounds and closed dbip on error exits in concat and constraint; cleaned up view_states and aborted failed transactions in dbi_state; and added file check in debug2c. |
|
||||
| `SEC-0246` | **Sev 2** | Memory Leaks, Buffer Overflow, Division by Zero, Out-of-bounds Memory Access, and Null Pointer Dereferences | `src/libged (Batch 4: decompose, delay, display_list, dm, draw, dsp, dump, dup, eac, edcodes)` | `FIXED` | In libged Batch 4: fixed memory leaks on non-NMG solids and db_lookup/db_diradd failures, replaced sprintf with snprintf, and eliminated double-free of new_m in decompose; validated sec/usec in delay; added NULL checks across display list erase/hash helpers and handled invent_solid failure; guarded argc > 0, freed dm_name leaks, and corrected return status in dm; guarded division by zero in aspect ratio, fixed loop index typo, and freed bu_vls in ert; freed dm_name on help path, added ndmp NULL guard, fixed argv bounds, and freed idata on failure in screengrab; guarded division by zero, plugged db_intern leaks in csg_wireframe_update and brep_adaptive_plot, and cleaned up draw_scene error paths in draw; resolved TODO by freeing dgcdp, plugged ap leak, and prevented duplicate ptbl initializations in bigE; freed brep_intern and obj_path in draw.c; guarded dbi_state and corrected view state lookup loop in draw2; prevented size_t underflows, freed tcl_argv, fixed orientation quaternion bounds, and guarded against division by zero in loadview; prevented buffer overflow in ged_cm_tree, checked argc >= 2 before fopen, and freed gd_rt_cmd and ged_tmp_uptrs in preview; validated xy argument count, fixed off-by-one bounds check, fixed intern2 typo in diff subcommand, and freed intern on lookup/read errors in dsp; used wdb_close in dump; enforced max_entries check to prevent array bounds overflow in dup; freed vls on read error, checked ID_COMBINATION, and used rt_db_free_internal in eac; added NULL pointer checks in comparisons, checked argc >= 2, freed av on fopen error, and used rt_db_free_internal in edcodes. |
|
||||
| `SEC-0247` | **Sev 2** | Memory Leaks, Double-Free, Dangling Pointer, Division by Zero, Out-of-bounds Memory Access, and Null Pointer Dereferences | `src/libged (Batch 5: edit)` | `FIXED` | In libged Batch 5 (edit commands): eliminated double-free hazards where rt_db_free_internal was called after GED_DB_PUT_INTERN in edarb and facedef; added ARB edge bounds check and validated argc in facedef; scoped bn_tol to function scope in cmd_checkpoint::exec to prevent dangling s->tol; freed intern and container struct on all paths and prevented double-free of pintern in cmd_perturb; guarded attribute NULL pointers and empty strings across rotate_*, scale_*, and translate_*; prevented floating-point division by zero on vector magnitudes across scale_* commands; and guarded uri constructor against NULL text pointer. |
|
||||
| `SEC-0248` | **Sev 2** | Memory Leaks, Out-of-bounds Memory Access, Logic Errors, and Null Pointer Dereferences | `src/libged (Batch 6: editit, edmater, env, env2c, erase, erase2, exec, exists, expand, eye_pos)` | `FIXED` | In libged Batch 6: fixed bu_opt_desc array indexing collision (d[0]..d[4]) and option parse error handling in editit; corrected argc passed to wmater, guarded argc <= 1, and aligned malloc tags in edmater; guarded NULL gedp and validated argc in env; validated argc range, checked bu_opt_parse return, and caught std::exception in env2c; plugged new_argv and bu_vls memory leaks, guarded avs bounds, and corrected option skipping in erase; checked bu_opt_parse, guarded argc <= 0 and bvs NULL in erase2; guarded argv[0] NULL dereference, checked gedp->i->i, and unwound recursion counters and exec_stack on recursion limit exceeded in exec; guarded out-of-bounds pointer advances and NULL dereferences in exists grammar and token lexer; reset backslash state per argument, used bu_vls_putc, and guarded string NULLs in expand; and corrected unit conversion factor from dbi_base2local to dbi_local2base when setting eye position in eye_pos. |
|
||||
| `SEC-0249` | **Sev 2** | Use-After-Free, Memory Leaks, Double-Free, Division by Zero, Out-of-bounds Memory Access, and Null Pointer Dereferences | `src/libged (Batch 7: facetize)` | `FIXED` | In libged Batch 7 (facetize): fixed Cat 1 Use-After-Free of wgedp database handle across iterative meshing attempts in brep.cpp; fixed 4 BU_PUT struct type mismatches and eliminated double-free in nmg.cpp; guarded division by zero on obj_bbox_vol, freed temporary bot faces/vertices on retry/abort, eliminated duplicate bounding box check, ensured bot is freed on all exits, replaced mismatched calloc with bu_calloc, and paired BU_GET with BU_PUT for manifold_mesh in old_facetize.cpp; validated stderr FD and NULL pointers in old_facetize_log.c; fixed memory leaks and eliminated double-frees in regions.cpp; fixed kill argument layout in subprocess/brep_csg.cpp; freed candidate bot on retry and fixed BU_PUT type in subprocess/continuation.cpp; freed cache_dir and checked seed in subprocess/main.cpp; verified ft_tessellate in subprocess/nmg.cpp; checked obj_bbox_vol with ZERO in subprocess/sample.cpp; checked point cloud bounds in subprocess/spsr.cpp; added NULL/empty guards in subprocess/util.cpp; freed temporary bu_vls in tess_opts.h; eliminated duplicate curtree allocation, freed td_name, and used bu_calloc in tri.cpp; and validated inputs, freed intern on diradd failure, and closed wdbip on error exits in util.cpp. |
|
||||
| `SEC-0250` | **Sev 2** | Memory Corruption, Memory Leaks, Resource Leaks, Catastrophic Data Loss Hazard, Recursion Lockout Bug, Division by Zero, Out-of-bounds Memory Access, and Null Pointer Dereferences | `src/libged (Batch 8: fb2pix, fbclear, form, fracture, garbage_collect, gdiff, ged, ged_cmd_scanner, ged_exec, ged_init)` | `FIXED` | In libged Batch 8: validated image dimensions and guarded fclose against stdout/NULL in fb2pix; replaced float literal comparisons, handled unquoted RGB args, and routed errors to ged_result_str in fbclear; reordered argc check ahead of db open and formatted error messages in form; freed old_intern, guarded log10(0), fixed cross-model region bug, eliminated global static status, freed model on diradd failure, and expanded string buffers in fracture; plugged bu_external leak, guarded division by zero, prevented database deletion on backup failure, checked db_ls path count, and cleaned up working file on errors in garbage_collect; guarded tolerance lookup, checked path bounds, initialized rt_db_internal, freed in1 on in2 failure, checked ID_COMBINATION, checked msgs NULL, reordered db_lookup before allocating full paths, and checked raydiff results in gdiff; fixed BU_PUT struct type mismatch freeing struct bu_list as struct bu_vls for gd_headDisplay and gd_headVDraw, zeroed ged_cbs on allocation with memset to prevent uninitialized counters triggering false recursive warnings, verified wdbp and dbip before creating ged struct in ged_open, decremented callback recursion depth before error return to prevent permanent callback lockout, and added NULL checks in callback handlers in ged; eliminated duplicate and out-of-bounds argv checks in generated wrappers in ged_cmd_scanner; guarded argv[0] and argc before bu_setprogname and verified plugin function pointers before dispatch in ged_exec; allocated sentinel NULL termination for command array and guarded filenames before path lookup in ged_init. |
|
||||
| `SEC-0251` | **Sev 2** | Memory Leaks, Buffer Overflow, Double-Free, Division by Zero, Out-of-bounds Memory Access, and Null Pointer Dereferences | `src/libged (Batch 9: inside, track, util, get, get_autoview, get_comb, get_eyemodel, get_obj_bounds, get_solid_kp)` | `FIXED` | In libged Batch 9: eliminated memory leaks on interactive prompts/errors, fixed out-of-bounds argv[2] access, cleared dangling idb_ptr, fixed copy-paste unit_d typo, and guarded negative radicands and division by zero across primitives in ged_inside; resolved 30-year-old swap bug overwriting tr[0] with uninitialized tr[2], expanded track name buffers, replaced sprintf with snprintf, eliminated double-free of intern, freed member lists, and guarded acos/slope against zero divisions and domain errors in ged_track; added bounds check in ged_results_get, validated wdbp and freed previous dbi_title in ged_dbcopy, checked scale factor scans, guarded eye model functions against NULL, freed intern on combadd2 error, and passed correct count to db_mkgift_tree in ged_util; freed intern and logged diagnostics when ft_get unavailable in get; fixed option parsing -p flag bug and validated remaining args in get_autoview; freed intern and rt_tree_array across all exits and used snprintf in get_comb; guarded trace levels to prevent buffer overflow, replaced free with bu_free, freed intern on rt_i_create failure, and validated ft_prep in get_obj_bounds; guarded NULL inputs, checked empty lists before list head access, and guarded vertex/curve pointers in get_solid_kp. |
|
||||
| `SEC-0252` | **Sev 2** | Memory Leaks, Buffer Overflow, Division by Zero, Out-of-bounds Memory Access, Logic Errors, and Null Pointer Dereferences | `src/libged (Batch 10: get_type, glob, gqa, graph, grid, grid2model_lu, grid2view_lu, group, heal, help)` | `FIXED` | In BRL-CAD libged Batch 10 commands (get_type, glob, gqa, graph, grid, grid2model_lu, grid2view_lu, group, heal, help): in get_type.c, validated argc and argv[1], initialized rt_db_internal before import, and guarded wdbp; in glob.c, added null checks to _debackslash, _backslash_specials, and _ged_expand_str_glob, checked gp->gl_pathv before string access, added per-word match counting to fall back to unescaping individual patterns when unmatched, and guarded argc and argv in ged_glob_core; in gqa.cpp, added null check on units buffer, constrained num_views (1..3) to prevent fixed-size array out-of-bounds access, guarded region and hit pointers against null in _gqa_overlap, initialized point arrays and passed valid pointer in _gqa_hit, bounded string traversal in find_cmd_line_obj, validated inputs and region count returning error on invalid state in allocate_per_region_data, removed redundant duplicate density file loading, fixed massive memory leaks of intern, density names, and avs across directories in densities_prep, prevented null dereference on strrchr, guarded against division by zero on state->shots across all views in view_reports, weight_volume_terminate, and summary_reports, guarded wdbp, rtip, obj_tbl, reg_tbl, and ged_gqa_plot.vbp before cleanup and destruction, and reset aborted state; in graph.cpp, checked ID_COMBINATION and pointers in process_comb and hl_scan_db, guarded child tree leaf names against null, verified file stream write success in hl_layout_and_output, removed redundant argument shifting in igraph mode and validated subcommand argument; in grid.c, guarded against null gv_s view state in grid_vsnap, grid_vls_print, and ged_grid_core, clamped user RGB color components to 0..255, and corrected error reporting parameter; in grid2model_lu.c, validated argv arguments and checked for zero denominator with ZERO macro before division; in grid2view_lu.c, guarded argv[1] and argv[2] against null; in group.c, validated group name and member arguments against null and empty strings; in heal.c, guarded arguments, clamped negative zipper tolerance, freed internal representation on non-BOT objects, and verified rt_db_put_internal return; in help.cpp, moved directory listing free inside directory traversal loop to eliminate directory listing leak, freed filepath on unreadable files, reset zeros counter per file so a binary file does not disable reading all subsequent documentation files, freed word buffer on each file exit, fixed cntptr type to size_t * preventing memory corruption, and checked bu_dir return before strdup while cleaning up resources when words == 0. |
|
||||
| `SEC-0253` | **Sev 2** | Resource Leaks, Buffer Overflow, Division by Zero, Out-of-bounds Memory Access, and Null Pointer Dereferences | `src/libged (Batch 11: help tests, hide, how, human, illum, importFg4Section, plugin.h, inside, instance, isize)` | `FIXED` | In BRL-CAD libged Batch 11 commands (test_help, hide, how, human, illum, importFg4Section, plugin.h, inside, instance, isize): in test_help.c, guarded ac and av pointers before calling bu_setprogname, and called ged_close before return to cleanly shut down GED resources; in hide.c, guarded argv[i] arguments against null or empty strings, tracked write and export failures, and corrected db5_export_object3 invocation; in how.c, initialized dpp, added null guards on hdlp, vls, dpp, and style struct pointer sp->s_os in dl_how, validated argument bounds and pointers, handled -b flag correctly, and guarded gd_headDisplay before traversal; in human.c, replaced process-terminating bu_exit calls with graceful error return in read_args, added null checks on fopen returns before writing to file pointers in text and verbose, validated argc, verified wdb_dbopen return, replaced unchecked sprintf with snprintf, and called wdb_close to eliminate persistent database handle leak; in illum.c, added GED_CHECK_DATABASE_OPEN, GED_CHECK_VIEW, GED_CHECK_DRAWABLE, and GED_CHECK_ARGC_GT_0 to ged_labelvert_core, guarded argv[i] arguments, checked dmp before calling dm_set_dirty, guarded gdlp and obj in dl_set_illum, validated directory pointer and d_namep, checked argv[1] against null using BU_STR_EQUAL, and verified gd_headDisplay; in importFg4Section.c, validated argc and argv pointers, verified wdb_dbopen return, and added wdb_close to eliminate database handle leak; in include/plugin.h, audited plugin macros; in inside.c, guarded argc and argv[1] against null and verified outdp; in instance.c, validated argument count and null/empty object and instance names, guarded argv[3] against null, and safely formatted invalid operation string; in isize.c, added GED_CHECK_DATABASE_OPEN to prevent null dereference of gedp->dbip, and guarded against division by zero using ZERO macro on base2local factor. |
|
||||
| `SEC-0254` | **Sev 2** | Use-After-Free, Memory Corruption, Memory Leaks, Double-Free, Infinite Loop, Out-of-bounds Memory Access, and Null Pointer Dereferences | `src/libged (Batch 12: item, joint, joint2, keep, keypoint, kill, killall, killrefs, killtree)` | `FIXED` | In BRL-CAD libged Batch 12: in item.c, validated argc range (3..6), guarded argv[1..2] against null, checked argv[3..5] before atoi, initialized rt_db_internal, and validated combination type; in joint.c, eliminated Cat 1 Use-After-Free in parse_hold by adding missing return after free_hold on EOF, fixed 64-bit struct member memory corruption where hp->priority was passed as double * clobbering flag, fixed infinite loop in joint_move dirs parsing by adding missing argv/argc increment, guarded against division by zero in parse_units with ZERO macro, eliminated persistent memory leaks in free_hold, part_solve, and joint_load by freeing arc sets, joint handles, and bu_vls, added null guards across hold_point_to_string, joint_unload, parse_error, joint_mesh, joint_save, joint_accept, joint_reject, reject_move, joint_solve, joint_hold, joint_move, and joint_cmd, fixed copy-paste typo in joint_reject usage, and corrected return status logic in joint_solve; in joint2.c, verified callback function pointers and selection counts, added bounds check preventing out-of-bounds read of argv[2] when argc == 2, and eliminated Cat 1 Double-Free of intern after GED_DB_PUT_INTERN; in keep.c, guarded directory and component pointers in node_write, closed incoming database on format mismatch and open failures to eliminate file descriptor leaks, and used wdb_close on all exits to properly release wdbp and underlying dbip; in keypoint.c, guarded argv[1..3] against null before bn_decode_vect and sscanf; in kill.c, enforced required object name argument after option stripping and guarded argv[i] in deletion loops; in killall.c, guarded argv[1] on -n check and enforced argument counts reporting usage; in killrefs.c, guarded argv[1], enforced argument count, guarded display erasure and tree deletion loops, and validated combination types; in killtree.c, guarded directory and data pointers in callbacks, enforced argument count after option parsing, guarded argv[i] in processing loop, and unconditionally freed argv allocations to eliminate -n memory leak. |
|
||||
| `SEC-0255` | **Sev 2** | Use-After-Free, Memory Leaks, Resource Leaks, Integer Underflow, Division by Zero, Out-of-bounds Memory Access, and Null Pointer Dereferences | `src/libged (Batch 13: label, lc, libfuncs, lint)` | `FIXED` | In BRL-CAD libged Batch 13: in label.c, validated argc and argv bounds before dereferencing argv[0]; in lc.c, guarded against null struct pointers and string fields before bu_strcmp and atoi in cmp_regions and sort_regions, validated argc and argv in ged_lc_core, handled bu_file_realpath null returns and freed norm_name on errors, closed output file and freed vls on error exits, freed results1 and results2 search tables via db_search_free, freed db_full_path root, duplicated attribute strings and freed all duplicated strings on all exits to eliminate Cat 1 Use-After-Free of stack-scoped avs attributes, and replaced descending size_t loop with reverse counting loop to prevent unsigned integer underflow; in libfuncs.c, guarded argv, argv[0], argv[1], and argv[2] before bu_sscanf, bn_decode_mat, and bn_decode_vect across mat_ae, mat_mul, mat4x3pnt, and mat_scale_about_pnt, and added missing newlines to usage strings; in lint/cyclic.cpp, freed path strings allocated by db_path_to_string, replaced process-terminating bu_bomb with graceful error logging, initialized rt_db_internal, and validated ID_COMBINATION and combination pointers; in lint/ged_lint.h, audited header declarations; in lint/invalid_shape.cpp, initialized intern, eliminated memory leaks of BREP, ARB8, DSP, and EXTRUDE internal representations on early returns by calling rt_db_free_internal across all exits, properly initialized and freed pc search table, and guarded directory pointers; in lint/lint.cpp, guarded ostr.pop_back() against empty problem vectors, validated key_val parsing, fixed off-by-one underflow in argument verification loop that caused argv[-1] out-of-bounds reads, freed combination members with mk_freemembers after mk_lcomb, and initialized is_region; in lint/lint_bot.cpp, validated triangle vertex indices against num_vertices and guarded normal magnitude before division in bot_face_normal, bounded triangle indices and vertex indices in tri_to_json and plot_bad_tris, guarded map iterator dereference in bot_check, clamped ncpus to num_faces, set last worker end to num_faces so the final triangle face is not skipped, cleaned per-worker resources with rt_clean_resource, and freed worker state array to eliminate thread resource and memory leaks; in lint/missing.cpp, replaced bu_bomb with graceful error logging, added buffer size checks against header lengths before pointer arithmetic in shape_find_missing to prevent buffer over-reads in DSP and EXTRUDE objects, and initialized and freed rt_db_internal structures across all exits; in lint/raytrace.cpp, verified ID_COMBINATION and tree pointers before traversing combination trees in subtree_has_halfspace and collect_subtree. |
|
||||
| `SEC-0256` | **Sev 2** | Memory Leaks, Resource Leaks, Integer Overflow, Infinite Loop, and Null Pointer Dereferences | `src/libged (Batch 14: list, lod, lod2, log, ls, lt, m2v_point, make, make_name, man)` | `FIXED` | In BRL-CAD libged Batch 14: in list.c, validated argc and argv bounds, added missing newline to usage, guarded argv[arg] against null, closed wdbp immediately after copying initial tree state to prevent wdbp handle leak, freed full path on traversal failures, initialized and freed internal structures, and guarded describe callbacks; in lod.c, checked argv bounds, guarded against null gvp and gvp->gv_s view state pointers before member access, validated non-negative scale factors using bu_sscanf, and guarded argv subcommands against null; in lod2.cpp, guarded gedp and ged_result_str against null before writing result; in log.c, guarded clientdata and str in log_hook, checked gedp->ged_log before hook operations and log dumps, validated argv[1], and added missing newlines to usage messages; in ls.c, guarded list_of_names and num_in_list in vls_long_dpp and vls_line_dpp, guarded directory pointers and names against null, initialized and freed intern representations, guarded ft_label and binunif typestrings before string length operations, guarded name and type widths against unsigned underflow, guarded argv in _ged_ls_attr_objs and _ged_ls_named_objs, guarded results_obj before formatting, and freed str vls on all exit paths to eliminate memory leaks; in lt.c, initialized intern, validated ID_COMBINATION and pointers before accessing comb tree, freed intern and vls on flatten tree error exit paths to eliminate memory leaks, guarded tree leaf names against null, and validated argv bounds and option characters; in m2v_point.c, guarded argv arguments, added missing newlines to usage, and replaced raw sscanf with bu_sscanf; in make.c, validated positive scale factors, guarded extrude_ip and freed internal on error, replaced sprintf with snprintf, and called rt_db_free_internal on db_diradd failure to eliminate primitive internal memory leaks; in make_name.c, validated argv pointers, added missing newlines, parsed -s argument with bu_sscanf ensuring non-negative index, added loop bounds and overflow guards in candidate generation loop, and avoided redundant null byte injection; in man.c, checked argv bounds, verified brlman path existence, freed lang vls on all early returns to eliminate memory leaks, cleaned up failed subprocess handles with bu_process_wait_n, and waited for CLI mode processes to exit cleanly. |
|
||||
|
||||
| `SEC-0257` | **Sev 2** | Memory Corruption, Resource Leaks, Memory Leaks, Out-of-bounds Memory Access, Integer Underflow, and Null Pointer Dereferences | `src/libged (Batch 15: match, mater, material, metaball, mirror, model2grid_lu, model2view, model2view_lu, move, move_all)` | `FIXED` | In BRL-CAD libged Batch 15 commands (match, mater, material, metaball, mirror, model2grid_lu, model2view, model2view_lu, move, move_all): in match.c, added missing newline to usage, guarded argv pointers against null, replaced unchecked pointer increment loop with safe index-bounded loop, and guarded dp and dp->d_namep before bu_path_match; in mater.cpp, freed d_path_dir vls across all exits, closed wdbp handle with wdb_close in mater_import, safely parsed mat_id with bu_sscanf before comparison, eliminated heap allocations for std::set and msgs to prevent memory leaks, freed new_buf from analyze_densities_write and bin_ext on db_dirbuild failure, replaced dynamic heap avs allocation with stack struct and ensured bu_avs_free is invoked on all iterations and exits, guarded oname before std::string conversion, safely parsed integer IDs, returned BRLCAD_ERROR on fail, and freed nname before early returns; in material.c, eliminated Cat 1 memory corruption by removing illegal bu_free on stack buffer, closed densityTable file descriptor on all paths, closed wdbp handle with wdb_close on all exits across import, create, set, and remove, freed AVS property tables on each loop iteration and exit, validated argc bounds before accessing argv indices, guarded string parsing loop against integer underflow, verified ID_MATERIAL internal type before accessing material structure, called rt_db_free_internal on all exit paths, prevented orphaning of bu_vls string buffers by using bu_vls_strcpy/bu_vls_trunc instead of BU_VLS_INIT, and propagated subcommand error return codes; in metaball.c, closed wdbp handle on all paths, verified DB5_MINORTYPE_BRLCAD_METABALL before casting internal pointer, replaced raw sscanf with bu_sscanf, fixed out-of-bounds pointer dereference of argv[3] when argc was 3 in delete error message, and added missing newlines to usage messages; in mirror.c, called rt_db_free_internal on all exit paths after rt_db_get_internal to eliminate primitive memory leaks, replaced raw sscanf with bu_sscanf, and guarded argv pointers against null; in model2grid_lu.c and model2view_lu.c, moved matrix dereferences after GED_CHECK_DATABASE_OPEN to prevent null dereference of gedp, guarded argv arguments, replaced sscanf with bu_sscanf, and added missing newlines; in model2view.c, guarded argv arguments, replaced raw sscanf with bu_sscanf, and added missing newline to usage; in move.c and move_all.c, called rt_db_free_internal after rt_db_put_internal to eliminate memory leaks, replaced libc free with bu_free on heap strings allocated by bu_strdup, safely updated display list path strings, guarded old and new name arguments against null, and fixed format parameter mismatch in name length limit error message. |
|
||||
| `SEC-0258` | **Sev 2** | Memory Corruption, Use-After-Free, Memory Leaks, Resource Leaks, Out-of-bounds Memory Access, and Null Pointer Dereferences | `src/libged (Batch 16: move_arb_edge, move_arb_face, mrot, nirt, nmg, nmg_cmface, nmg_collapse, nmg_fix_normals, nmg_kill_f, nmg_kill_v)` | `FIXED` | In BRL-CAD libged Batch 16 commands (move_arb_edge, move_arb_face, mrot, nirt, nmg, nmg_cmface, nmg_collapse, nmg_fix_normals, nmg_kill_f, nmg_kill_v): in move_arb_edge.c, closed wdbp handle on all exit paths in move_arb_edge and find_arb_edge, called rt_db_free_internal after rt_db_put_internal to eliminate memory leaks, guarded argv pointers against null, replaced raw sscanf with bu_sscanf, and added missing newlines to usage and error messages; in move_arb_face.c, eliminated Cat 1 memory corruption and stack array overflow by enforcing face bounds check on both positive and negative indices for the specific arb_type before modifying planes array, closed wdbp handle on all paths, called rt_db_free_internal after rt_db_put_internal, returned BRLCAD_ERROR when object is not an ARB, replaced sscanf with bu_sscanf, and added missing newlines; in mrot.c, validated argv and argv[i] pointers against null, and added missing newlines; in nirt.cpp, eliminated Cat 1 heap corruption on subprocess failure by replacing incorrect cast and free of string pointers as bu_vls structures with bu_free, fixed use of freed av_args and memory leak of obj by directly emitting draw commands to stdin in skip_drawn block, freed nirt exec string and nv options across all error returns, corrected loop to inspect argv[i] instead of repeatedly checking argv[0], freed dpv allocated by db_ls, fixed off-by-4 bug in ged_vnirt_core where av[i] = NULL clobbered argument pointers, replaced sscanf with bu_sscanf, guarded ged_gdp before dl_set_wflag, and added missing newlines; in nmg.c, eliminated Cat 1 linked list corruption in get_face_list where actual model face list pointers were stolen into stack f_list causing circular loops and free crashes by using detached copy structs, freed internal representations and face list allocations, fixed off-by-one subcommand lookup in ged_nmg_core where subcmd was erroneously read from argv[0] instead of argv[1], guarded argv[2] before dereferencing in kill, move, and make subcommands, and propagated subcommand return codes; in nmg_cmface.c, freed verts buffer to eliminate persistent memory leaks, closed wdbp handle on all paths, replaced atof with bu_sscanf, corrected variable in error message, and added missing newlines; in nmg_collapse.c, closed wdbp on all exit paths, freed internal representation on non-planar face detection, validated tolerances with bu_sscanf and ZERO macro, and added missing newlines; in nmg_fix_normals.c, persisted fixed normals to database via rt_db_put_internal, freed internal representation, and added missing newlines; in nmg_kill_f.c, eliminated Cat 1 Use-After-Free in remove_face by immediately returning once target face is destroyed by nmg_kfu, closed wdbp on all paths, parsed fid with bu_sscanf, and added missing newlines; in nmg_kill_v.c, eliminated Cat 1 Use-After-Free and Double-Free in remove_vertex by restarting topology search on each deletion instead of continuing iteration on freed loopuses and edgeuses, closed wdbp on all paths, parsed coordinates with bu_sscanf, and added missing newlines. |
|
||||
| `SEC-0259` | **Sev 2** | Use-After-Free, Memory Leaks, Resource Leaks, Out-of-bounds Memory Access, Logic Errors, and Null Pointer Dereferences | `src/libged (Batch 17: nmg_make_v, nmg_mm, nmg_move_v, nmg_simplify, npush, ocenter, open, orient, orotate, oscale)` | `FIXED` | In BRL-CAD libged Batch 17 commands (nmg_make_v, nmg_mm, nmg_move_v, nmg_simplify, npush, ocenter, open, orient, orotate, oscale): in nmg_make_v.c, validated vertex coordinates with bu_sscanf, closed wdbp handle with wdb_close on error and success paths, freed verts buffer on wdb_put_internal failure, and added missing newlines to usage and error strings; in nmg_mm.c, freed internal representation on db_diradd failure to prevent memory leak, checked rt_db_put_internal return status, and added missing newline to usage; in nmg_move_v.c, validated 6 coordinate arguments using bu_sscanf, closed wdbp handle on error and success exits, reported correct object name on error, and added missing newline to usage; in nmg_simplify.c, eliminated Cat 1 Use-After-Free and database corruption where failure of all conversion methods (arb/tgc/poly) fell through to out1: attempting to add and write a freed/stale new_intern, closed wdbp handle on all exit paths in out3:, and added missing newlines to usage strings; in npush.cpp, eliminated persistent leak of rt_wdb handle by immediately copying tolerance and closing wdbp, freed temporary msgs vls on early exit in non-verbose conflict path, added missing newlines to conflict and error messages, and preserved all missing/added tops reports by using bu_vls_printf instead of bu_vls_sprintf; in ocenter.c, added bounds check on gtd.gtd_objpos to prevent negative array indexing out-of-bounds, replaced sscanf with bu_sscanf, and added missing newlines to usage and error strings; in open.cpp, added missing newlines in usage and error strings, returned BRLCAD_OK when print_help is requested, and safely destroyed existing ged_lod context and dbi_state before reassigning; in orient.c, fixed off-by-one error in error reporting where argv[i-1] was printed instead of argv[i], replaced sscanf with bu_sscanf, and added missing newlines to usage strings; in orotate.c, added bounds check on gtd.gtd_objpos to prevent out-of-bounds array access, replaced sscanf with bu_sscanf, and added missing newlines to usage and error strings; in oscale.c, added scale factor validation with bu_sscanf and SQRT_SMALL_FASTF to prevent degenerate or non-positive scaling, added bounds check on gtd.gtd_objpos, and added missing newlines to usage and error strings. |
|
||||
| `SEC-0260` | **Sev 2** | Resource Leaks, Double-Free, Buffer Overflow, Logic Errors, Out-of-bounds Memory Access, and Process Termination in Library Function | `src/libged (Batch 18: osg, otranslate, overlay, path, pathlist, pathsum, perspective, pipe, pix2fb, plot)` | `FIXED` | In BRL-CAD libged Batch 18 commands (osg, otranslate, overlay, path, pathlist, pathsum, perspective, pipe, pix2fb, plot): in osg.cpp, added NULL pointer checks to _osgLoadHiddenSolid, _osgLoadSolid, and _ged_osgLoadScene, and verified osp->viewer validity; in otranslate.c, added bounds check on gtd.gtd_objpos preventing negative out-of-bounds array access, replaced sscanf with bu_sscanf, and added missing newlines to usage and error strings; in overlay.c, fixed out-of-bounds / null pointer dereference on argv[1] when bu_file_list returned <= 0 by changing to argv[0], freed vbp on fopen failure inside loop to eliminate memory leak, preserved cmd_name for diagnostics, and added missing newlines; in path.c, fixed critical logic flaw where the return value of path_validate_recurse was ignored allowing invalid paths to pass validation, checked intern.idb_type == ID_COMBINATION, and added missing newline; in pathlist.c, eliminated persistent wdbp database handle leak by immediately calling wdb_close after reading initial tree state, replaced static mutable global pathListNoLeaf with thread-safe struct pathlist_data passed via client_data, checked fp_len > 1 before decrement, and added missing newlines; in pathsum.c, checked _GED_TRACE_MAX_LEVELS upper bound to prevent stack buffer overflow in gtd.gtd_obj, duplicated path argument before calling strtok to avoid in-place mutation of argv and thread safety issues, and added missing newlines; in perspective.c, replaced sscanf with bu_sscanf, added angle range check [0, 180) to prevent division by zero or singularity in persp_mat, and added missing newlines; in pipe.c, eliminated persistent wdbp leaks by calling wdb_close across append, find, and move commands, fixed out-of-bounds argv[3] access when argc == 3 in delete command by correcting to argv[2], eliminated double-free hazards of intern following GED_DB_PUT_INTERN, replaced sscanf with bu_sscanf, checked seg_i >= 0, and added missing newlines; in pix2fb.c, eliminated process termination bug where bu_exit was invoked on file open failure by returning error and logging to ged_result_str, fixed usage string repetition, checked infd > 0 before close, and formatted error messages with argv[0] and newlines; in plot.c, removed mutable static local variables in dl_plot making it reentrant and thread-safe, preserved cmd_name before advancing argv, freed bu_vls str on popen failure, formatted system errors with strerror(errno) into result string, and added missing newlines. |
|
||||
| `SEC-0261` | **Sev 2** | Memory Leaks, Resource Leaks, Buffer Overflow, Infinite Loop, In-place Argument Mutation, and Null Pointer Dereferences | `src/libged (Batch 19: pmat, pmodel2view, png, png2fb, pnts, pnts_util, points_eval, polyclip, prcolor)` | `FIXED` | In BRL-CAD libged Batch 19 commands (pmat, pmodel2view, png, png2fb, pnts, pnts_util, pnts_util.h, points_eval, polyclip, prcolor): in pmat.c, added diagnostic error message on bn_decode_mat failure and fixed usage formatting; in pmodel2view.c, added missing newline to usage string; in png.c, encapsulated mutable globals in struct png_state, removed static locals from draw_png_solid for thread safety, clamped raster coordinates against image bounds to prevent buffer overflow, clamped img_size to prevent integer overflow in buffer allocation, replaced raw sscanf with bu_sscanf, freed image and bytes buffers and destroyed libpng structures via png_destroy_write_struct on all error and success exits to eliminate persistent memory leaks, and added missing newlines to usage and error messages; in png2fb.c, removed duplicate usage prefix, distinguished file open failure from help request returning error instead of printing usage, replaced stderr writes with bu_log, and added missing newlines; in pnts.cpp, added bounds checks in _pnts_collect_arrays linked list loops to prevent heap buffer overflow, eliminated in-place mutation of caller argv in _ged_pnts_cmd_tri and ged_pnts_core by passing offset pointers and lengths to bu_cmd, propagated subcommand return codes, fixed unsafe argc decrement when argc <= 0, freed fl and unit vls structures on all exits in _ged_pnts_cmd_read, used RAII guard for pnt_str in _ged_pnts_cmd_write to eliminate persistent memory leak on every write operation, freed intern on fopen failure, and added missing newlines to result and error strings; in pnts_util.c, added NULL pointer checks to _ged_pnt_v_set, _ged_pnt_c_set, _ged_pnt_s_set, _ged_pnt_n_set, _ged_pnts_init_head_pnt, _ged_pnts_add, and _ged_pnts_dup; in points_eval.c, guarded d->dbip against NULL, checked fp->fp_len > 0 before calling DB_FULL_PATH_CUR_DIR, and properly initialized intern; in polyclip.cpp, closed wdbp database handles on all exit paths in ged_import_polygon, ged_polygons_overlap, and ged_polygon_fill_segments to eliminate persistent handle leaks, guarded input pointers, validated vfilldelta > SMALL_FASTF to prevent infinite loop hang, freed all 2D polygon contours, contour points, hole arrays, and result_vls on completion in ged_polygon_fill_segments to eliminate massive memory leak, and freed intern on export failure; in prcolor.c, replaced sprintf with snprintf to prevent buffer overflow, and added missing newlines to usage and none output. |
|
||||
| `SEC-0262` | **Sev 2** | Memory Corruption, Resource Leaks, Double-Free, Pointer Cast Error, and Underflows | `src/libged (Batch 20: prefix, process, ps, pset, pull, push, put, put_comb, putmat, qray)` | `FIXED` | In BRL-CAD libged Batch 20 commands (prefix, process, ps, pset, pull, push, put, put_comb, putmat, qray): in prefix.c, removed leftover debugging bu_log prints, guarded prefix against empty string, guarded directory names against null/empty in rename loop, freed tempstring_v5 on all early error exits to eliminate memory leaks, validated intern.idb_type == ID_COMBINATION before tree walk, and added missing newlines to usage and error strings; in process.c, fixed Cat 1 integer underflow and memory exhaustion in _ged_process_list where longest_pid < 3 underflowed longest_pid - 3 to UINT_MAX - 2 when passed to %*c in bu_vls_sprintf, freed cmdroot before return in _ged_process_gabort to eliminate memory leak, added null guards on subprocess pointers, streamlined subcommand dispatch in ged_process_core to properly display help on unrecognized or malformed arguments, and added missing newlines; in ps.c, removed mutable static local variables in ps_draw_solid making it reentrant and preventing state leakage between solids, replaced sscanf with bu_sscanf, changed early return on bad color to goto bad so font, title, and creator are freed on error, guarded sp and hdlp against null in ps_draw_body, guarded bu_optind > 0 before accessing argv[bu_optind-1], and added missing newlines to usage and error strings; in pset.c, replaced sscanf with bu_sscanf, guarded attribute against null and empty string in _ged_set_metaball, clamped threshold when ZERO(threshold), guarded argv arguments against null, simplified cleanup to unconditionally call rt_db_free_internal(&intern) whenever ret != BRLCAD_OK, and added missing newlines; in pull.c, fixed Cat 1 pointer cast corruption in pull_leaf where mp (mat_t *) was cast to struct bu_vls * and passed to bu_vls_printf, fixed massive memory leak where modified primitives transformed by ft_xform were never written back or freed by adding rt_db_put_internal and rt_db_free_internal, fixed option parsing bug in ged_pull_core where argc != 2 check and db_lookup preceded bu_getopt making -d impossible to pass, passed (matp_t)NULL instead of 0-matrix m to rt_db_get_internal in pull_comb, freed intern on empty comb trees, checked return of bn_mat_inverse, and added missing newlines; in push.c, eliminated persistent resource leak of wdbp by immediately extracting init_state and calling wdb_close(wdbp), guarded argc < 1 after option stripping, guarded null directory and database pointers and freed intern on empty comb trees in identitize, and added missing newlines; in put.c, eliminated Cat 1 double-free of intern where rt_db_free_internal(&intern) was called after wdb_put_internal (which unconditionally frees the internal structure on both success and failure), closed wdbp with wdb_close(wdbp) on both error and success paths to eliminate handle leak, guarded argv[1] and argv[2] against null and empty strings, and added missing newlines; in put_comb.c, eliminated Cat 1 buffer underflow in trailing space stripping loop where empty or all-space names decremented i below 0 and accessed name[-1], fixed logic bug in mktemp_comb where db_lookup checked template string str instead of candidate name, freed rt_tree_array on error and success paths in put_tree_into_comb_and_export to eliminate persistent memory leak, freed intern on db_diradd failure in save_comb, replaced sscanf with bu_sscanf and guarded null str in put_rgb_into_comb, and added missing newlines; in putmat.c, eliminated Cat 1 memory leaks of name1 and name2 in _getmat where bu_vls_free was omitted on all successful matrix retrieval paths, removed machine-identifiable paths from error messages, guarded against null argv[1] and argv[2], and added missing newlines; in qray.cpp, fixed Cat 1 out-of-bounds string access in qray_init when parsing format lines shorter than expected, and added null pointer checks on gdp, gdp->gd_qray_fmts, and vhead in qray_init, qray_free, and qray_data_to_vlist. |
|
||||
| `SEC-0263` | **Sev 2** | Double-Free, Memory Leaks, Division by Zero, Uninitialized Memory Reads, Pointer Aliasing, and Missing Validation | `src/libged (Batch 21: qray, qray.h, quit, rcodes, rect, red, regdef, region, repair, rfarb)` | `FIXED` | In BRL-CAD libged Batch 21 commands (qray, qray.h, quit, rcodes, rect, red, regdef, region, repair, rfarb): in qray.h, fixed macro parameter bug in DG_QRAY_BOTH; in qray/qray.c, added null checks on gedp->i and gedp->i->ged_gdp across all entry points, replaced sscanf with bu_sscanf, corrected typo in command name, and added missing newlines to error strings; in quit/quit.cpp, verified clean with no changes needed; in rcodes/rcodes.c, eliminated Cat 1 double-free of intern on rt_db_put_internal failure (which unconditionally frees intern internally), eliminated persistent memory leak by freeing intern when changed == 0 or when non-combination objects are encountered, replaced sscanf with bu_sscanf, added null and empty string checks on argv[1], and added missing newlines to usage and error messages; in rect/rect.c, added null check on gedp->ged_gvp->gv_s, added ZERO(grsp->aspect) and cdim <= 0 checks to prevent division by zero in rect_image2view and rect_adjust_for_zoom, validated user coordinate dimensions to prevent division by zero, replaced sscanf with bu_sscanf, guarded argv[0] and argv[1] against null, and added missing newlines; in red/red.c, eliminated mutable file-scope static global buffer _ged_tmpfil by passing stack-allocated buffer into build_comb and write_comb to ensure thread safety, eliminated persistent memory leaks of rt_tree_array across all error and success exits in both build_comb and write_comb, freed intern on all early error paths in build_comb and after write_comb in ged_red_core, freed allocated matrix on error in _ged_find_matrix, replaced sprintf with snprintf to prevent buffer overflow, and added missing newlines; in regdef/regdef.c, guarded wdbp against null return from wdb_dbopen, replaced sscanf with bu_sscanf, and added missing newlines to usage and output strings; in region/region.c, guarded wdbp against null, guarded argv[1], argv[i], and argv[i+1] against null/empty, and added missing newlines to usage and error strings; in repair/repair.cpp, added GED_CHECK_DATABASE_OPEN, GED_CHECK_READ_ONLY, and GED_CHECK_ARGC_GT_0 guards, handled bu_opt_parse error returns, eliminated Cat 1 double-free of intern by only freeing intern when ft_repair returns non-zero (rt_db_put_internal unconditionally frees intern on both success and failure), guarded argv[i] against null/empty, and added newlines to JSON status messages; in rfarb.c, eliminated Cat 1 double-free of internal on rt_db_put_internal failure and returned BRLCAD_ERROR, eliminated memory leak of internal on db_diradd failure, prevented uninitialized stack coordinate usage by returning BRLCAD_ERROR when bu_sscanf coordinate parsing fails, replaced sscanf with bu_sscanf, guarded argv against null, and added missing newlines to all error and usage messages. |
|
||||
| `SEC-0264` | **Sev 2** | Stack Buffer Overflow, Memory Leaks, Logic Inversion, Out-of-bounds Array Access, Command Length Miscalculation, and Missing Validation | `src/libged (Batch 22: rm, rmap, rmat, rmater, rot, rotate_about, rot_point, rrt, rt, rtabort)` | `FIXED` | In BRL-CAD libged Batch 22 commands (rm, rmap, rmat, rmater, rot, rotate_about, rot_point, rrt, rt, rtabort): in rm.c, fixed boolean CSG tree subtraction bug in _rm_tree_remove_named_leaf_instance where removing the left child of an OP_SUBTRACT node erroneously promoted the right child to a positive union instead of freeing the right tree and nullifying the subtraction, guarded null and empty operands in _rm_expand_operand while preserving unmatched glob patterns for standard error reporting, guarded argv[i] against null/empty in operand loop, and added missing newline to usage string; in rmap.c, added _ged_rmap_free_list helper and called it on rt_db_get_internal failure to eliminate persistent memory leaks of id_to_names and id_names list nodes, validated intern.idb_type == ID_COMBINATION and intern.idb_ptr before casting, replaced bu_vls_addr with bu_vls_cstr, and added missing newlines to usage and error messages; in rmat.c, added null check on argv[1], reported diagnostic error message when bn_decode_mat fails, and added missing newline to usage; in rmater.c, fixed stack buffer overflow in extract_mater_from_line by bounding string extraction to name and shader buffer capacities, replaced raw sscanf with bu_sscanf, prevented undefined behavior and crash by continuing loop instead of falling through on rt_db_get_internal failure, validated intern.idb_type == ID_COMBINATION before accessing comb, used bu_vls_trunc to safely clear comb->shader, and added missing newlines; in rot.c, added standard GED_CHECK_DATABASE_OPEN, GED_CHECK_VIEW, and GED_CHECK_ARGC_GT_0 guards; in rotate_about.c, guarded against out-of-bounds byte reads and null dereference on argv[1], and added missing newlines to current setting output and usage strings; in rot_point.c, fixed copy-paste typo where ged_m2v_point was reported instead of command name, replaced sscanf with bu_sscanf, guarded coordinate arguments against null, and added missing newlines; in rrt.c, fixed command length miscalculation where gd_rt_cmd_len was set only to the count of who objects rather than the full command length, eliminated persistent memory leak of strings allocated by ged_who_argv by freeing each who object after execution, and guarded argv[i] against null; in rt.c, replaced sprintf with snprintf, provided PATH fallback when bu_dir returns null, guarded argv[i] against null, and explicitly null-terminated gd_rt_cmd; in rtabort.c, added null checks on rrp, rrp->p, and cmd before processing and terminating subprocesses, and added missing newline to usage string. |
|
||||
| `SEC-0265` | **Sev 2** | Resource Leaks, Memory Leaks, Null Pointer Dereferences, Out-of-bounds Memory Access, and Missing Validation | `src/libged (Batch 23: rtcheck, rtcheck2, rtwizard, savekey, scale, search, select, select2, set_output_script, set_transparency)` | `FIXED` | In BRL-CAD libged Batch 23 commands (rtcheck, rtcheck2, rtwizard, savekey, scale, search, select, select2, set_output_script, set_transparency): in rtcheck.c, added null checks in rtcheck_vector_handler and rtcheck_output_handler on rtcp, rrtp, gedp, rtcp->fp, and rrtp->p, provided PATH fallback when bu_dir returns null, allocated args + 1 for gd_rt_cmd, guarded argv[i] against null, and eliminated persistent memory leak of strings allocated by ged_who_argv by freeing each string on error and success paths; in rtcheck2.cpp, added null checks in rtcheck_vector_handler and rtcheck_output_handler on rtcp, rrtp, gedp, rtcp->fp, and rrtp->p, provided PATH fallback when bu_dir returns null, allocated args + 1, guarded argv[i] against null, and freed strings allocated by ged_who_argv on error and success paths; in rtwizard.c, added null checks on gedp and gd_rt_cmd in _ged_run_rtwizard, replaced sprintf with snprintf, allocated args + 1 for gd_rt_cmd, guarded argv[i] against null, and freed strings returned by ged_who_argv upon command completion to eliminate memory leaks; in savekey.c, added null checks on gedp, gvp, fp, and eye_model in savekey_rt_oldwrite, validated time argument with bu_sscanf instead of raw atof and reported error on invalid input, replaced raw perror writes to stderr with structured error logging to ged_result_str, checked argv[1], and added missing newlines to usage and error strings; in scale.c, added GED_CHECK_DATABASE_OPEN, GED_CHECK_VIEW, and GED_CHECK_ARGC_GT_0 guards, validated scale factor against non-positive and non-finite values and reported error instead of silently returning OK, and added missing newline to error message; in search.c, corrected pointer size calculation from sizeof(char *) to sizeof(struct directory *) in _ged_search_localized_obj_list, added missing GED_CHECK_DATABASE_OPEN and GED_CHECK_ARGC_GT_0 guards in ged_search_core, guarded argv_orig[i] against null in option scanning loop, checked bu_argv_dup return value, and bounded plan_argv < argc in both plan discovery and plan string construction loops to prevent out-of-bounds pointer reads; in select.c, plugged persistent leak of rt_wdb database handles opened via wdb_dbopen by ensuring wdb_close is called immediately after import or upon error in both ged_select_core and ged_rselect_core, guarded ged_gvp->gv_s before accessing screen rectangle, freed intern on early error paths, replaced raw sscanf with bu_sscanf, added missing newlines to all error and usage messages, and added null checks on botip, botip->vertices, hdlp, and vls; in select2.cpp, added GED_CHECK_DATABASE_OPEN and GED_CHECK_ARGC_GT_0 guards in ged_select2_core, guarded argv[i] in option loop, safely checked argc <= 0 before indexing argv[0] in subcommand dispatch, added null checks in _select_cmd_msgs, and added missing newlines in _select_cmd_add and _select_cmd_rm; in set_output_script.c, added missing newline to usage, and guarded against passing null ged_output_script to %s in bu_vls_printf; in set_transparency.c, added GED_CHECK_DATABASE_OPEN guard, returned GED_HELP on argc == 1, replaced raw sscanf with bu_sscanf, clamped transparency to [0.0, 1.0], returned BRLCAD_ERROR when _ged_build_dpp fails, added null checks on gedp, i, ged_gdp, dpp, hdlp, and sp->s_os in dl_set_transparency, and added missing newlines to usage messages. |
|
||||
| `SEC-0266` | **Sev 2** | Resource Leaks, Memory Leaks, Double-Free, Division by Zero, Mutating Input, and Null Pointer Dereferences | `src/libged (Batch 24: set_uplotOutputMode, setview, shaded_mode, shader, shells, showmats, shrinkwrap, simulate)` | `FIXED` | In BRL-CAD libged Batch 24 commands (set_uplotOutputMode, setview, shaded_mode, shader, shells, showmats, shrinkwrap, simulate): in set_uplotOutputMode.c, added null and empty string guards on argv[1] before inspecting characters, and appended missing newlines to usage, binary, and text output strings; in setview.c, added null checks on argv[1] when argc == 2 and argv[1..3] when argc == 4, replaced raw sscanf with bu_sscanf, safely printed bad coordinate values, and added missing newlines to usage strings; in shaded_mode.c, guarded argv[1] against null, replaced raw sscanf with bu_sscanf, and added missing newlines to mode output and usage strings; in shader.c, added null check on argv[1], verified argv[2..argc-1] are non-null before bu_vls_from_argv, replaced bu_vls_addr with bu_vls_cstr, and added missing newlines to usage, current shader output, and read-only error message; in shells.c, fixed major resource and memory leaks by deferring wdb_dbopen until after argument validation, verifying wdbp allocation, calling wdb_close on all error and success exits, calling rt_db_free_internal on old_intern across all exits, freeing shell_name on all exits, and eliminating double-free of m_tmp after rt_db_put_internal failure; in showmats.c, eliminated mutation of input path and improved safety by operating on a duplicated string buffer via bu_strdup and freeing path_copy on all exit paths, guarded smdp, smdp->smd_child, and comb_leaf->tr_l.tl_name against null in Do_showmats, guarded argv[1] against null in ged_showmats_core, added trailing newline to 16-element matrix output in -a mode, and added missing newlines to usage strings; in shrinkwrap.c, added GED_CHECK_DATABASE_OPEN guard and safely handled potential null argv[0]; in simulate/ged_command.cpp, added missing newline to non-Bullet error message, validated argc >= 3 and ensured argv[1] and argv[2] are non-null before parsing options, wrapped anim_state in std::unique_ptr to prevent persistent memory and resource leaks if exceptions are thrown during simulation steps, and added missing newline to exception result output; in simulate/rt_collision_algorithm.cpp, guarded against null rays in free_xrays, prevented division by zero by validating grid_radius > 0 and radius > 0 in generate_ray_grid and get_rays, returning null safely instead of calling bu_bomb, and added null checks on btRigidBody::upcast, getMotionState, and rays.ptr in calculate_contact_points to prevent null pointer dereferences. |
|
||||
| `SEC-0267` | **Sev 2** | Resource Leaks, Memory Corruption, Unhandled Exceptions/Process Termination (bu_bomb), and Null Pointer Dereferences | `src/libged (Batch 25: simulate)` | `FIXED` | In BRL-CAD libged Batch 25 commands (src/libged/simulate/*): in rt_collision_shape.cpp, eliminated process-aborting bu_bomb calls by zeroing inertia when mass <= 0.0 and clamping negative scaling and margin values to 0.0; in rt_debug_draw.cpp, fixed major resource leaks of in-memory database handles by ensuring wdb_close is called on all paths in drawLine, drawAabb, and drawContactPoint, clamped color components to [0.0, 1.0] instead of terminating with bu_bomb, and added null check on message in reportErrorWarning; in rt_instance.cpp, guarded against null application and partition pointers in multioverlap_handler, falling back safely to rt_default_multioverlap on unexpected region table lengths or region names instead of calling bu_bomb, and threw InvalidSimulationError instead of aborting the process with bu_bomb when rt_i_create or rt_gettrees fails in get_overlaps; in rt_motion_state.cpp, guarded matrix and result destination pointers in bt_transform_to_matrix and path_to_matrix, and threw InvalidSimulationError instead of calling bu_bomb on rt_db_get_internal, db_find_named_leaf, or rt_db_put_internal failure; in rt_roi_collision_shape.cpp, guarded against null m_box_shape before dereferencing in getAabb, calculateLocalInertia, getLocalScaling, getMargin, setLocalScaling, and setMargin, clamped negative scaling and margin values, and zeroed inertia when mass <= 0.0; and in rt_roi_collision_shape.hpp, declared copy constructor and assignment operator private to enforce the Rule of Three and prevent double-free corruption of m_box_shape. |
|
||||
| `SEC-0268` | **Sev 2** | Memory Leaks, Inverted Return Value Logic Bug, Process Termination in Library Function (bu_bomb), Missing Validation, Division by Zero, and Null Pointer Dereferences | `src/libged (Batch 26: simulate, slew, solid_report)` | `FIXED` | In BRL-CAD libged Batch 26 commands (simulate, slew, solid_report): in simulate/sim_animate.cpp and sim_animate.hpp, added null checks in az_el_to_offset, look_at_quaternion, and ae_to_quaternion, guarded m_gedp and dbip in getSceneCenter and renderFrame, cleared jpeg_data on error and bounded maximum buffer read size in readPixToJpeg, validated width, height, and fps in encodeVideo, enforced the Rule of Three on SimAnimState with private copy constructor and assignment operator, and removed unused method declaration writeMjpegAvi; in simulate/simulation.cpp and simulation.hpp, eliminated multiple process-terminating bu_bomb calls across get_aabb, get_simulation_parameters, Region::get_region, and Region::get_regions by throwing InvalidSimulationError with contextual path information, replaced bu_bomb in saveState with warning logging, eliminated persistent memory leak of bullet collision create functions in Simulation::Simulation by tracking allocated CreateFunc pointers in m_create_funcs and deleting them in ~Simulation(), and enforced the Rule of Three on Simulation and Region; in simulate/tests/simulate_test.cpp, safely returned false on null matrix in matrix_equal instead of calling bu_bomb, and guarded argv and argv[0] in main; in simulate/tests/verify_simulation.c, added null checks in parse_bbox, get_bbox, check_presim, check_postsim, and main, replaced raw sscanf with bu_sscanf, replaced bu_vls_addr with bu_vls_cstr, and guarded against division by zero on truck_height when calculating penetration percentage; in simulate/utility.cpp, threw InvalidSimulationError in current_dir on empty paths, fixed critical inverted logic bug in set_region where bu_avs_remove returning 1 on successful attribute removal was erroneously treated as an error causing bu_bomb to abort the process, and replaced remaining bu_bomb calls with warning logging to ensure clean teardown in ~TemporaryRegionHandle; in slew/slew.c, added null checks on argv[1..3], replaced raw sscanf with bu_sscanf, and added missing newlines to all usage strings; and in solid_report/solid_report.c, guarded gedp against null. |
|
||||
| `SEC-0269` | **Sev 2** | Memory Leaks, Resource Leaks, Option Parsing Collision, Uninitialized Memory Operations, and Null Pointer Dereferences | `src/libged (Batch 27: solids_on_ray, sphgroup, stat, summary, sync, tab_complete, tables, bot_dump, bot_split, check_mann_docs)` | `FIXED` | In BRL-CAD libged Batch 27 commands and test drivers: in solids_on_ray/solids_on_ray.c, eliminated persistent memory leaks of solids_on_ray_cmd_vec strings (allocated by ged_who_argv) and snames path strings (allocated by db_path_to_string), added null guards on ap and PartHeadp in rpt_hits, verified pp->pt_inseg and pp->pt_inseg->seg_stp before retrieving path, guarded ap in rpt_miss, added null checks on gedp, dbip, ray_orig, and ray_dir in skewer_solids, replaced raw sscanf with bu_sscanf, added null checks on argv[1] and argv[2], and added missing newlines to usage and error strings; in sphgroup/sphgroup.c, fixed persistent memory leak of sph_intern by calling rt_db_free_internal on non-sphere error, _ged_combadd error, and normal exit, added null/empty string validation on argv[1] and argv[2], added missing newline to usage string, and deleted commented-out dead code; in stat/stat.cpp, fixed option parsing bug where the -q quiet flag was clobbered by -r raw due to duplicate array index d[3], fixed memory leaks in cmp_dps by using std::string to eliminate bu_vls leaks and freeing avs and string allocations on all exit paths, fixed memory leaks in stat_output by scoping bu_vls and freeing avs, added null/bounds checks in dpath_sort and _stat_find_first_unescaped, and added missing newlines to bu_log; in summary/summary.c, fixed major memory leak in solid_counter by calling rt_db_free_internal, added null checks in comb_counter and solid_counter, validated bu_opt_parse return value, guarded argv[0] against null, and added error output on missing objects; in sync/sync.c, added GED_CHECK_ARGC_GT_0 to prevent null dereference of argv[0] and appended missing newline; in tab_complete.cpp, added null guards in alphanum_cmp, path_match, obj_match, and ged_cmd_completions; in tables/tables.c, fixed memory leak of tree_objs bu_ptbl, verified read count before matching identt in tables_sol_number, initialized static descriptors to -1, guarded sol_loaded before invoking ft_describe or freeing sol_intern in tables_new, guarded getpwuid against null in tables_header, guarded ctime return in ged_tables_core, and added missing newlines; in tests/bot/bot_dump.cpp, guarded argv against null, corrected arbs_stl output comparison path for arb4_bot_02.stl, and added missing newlines; in tests/bot/bot_split.cpp, guarded argv in main, added null checks in check_output_group, check_output_bot, and check_decimated_bot, and ensured rt_db_free_internal is called on early return; and in tests/check_mann_docs.cpp, validated argv in main, added null checks before array indexing, and verified file stream is_open status before reading or writing. |
|
||||
| `SEC-0270` | **Sev 2** | Logic Bugs, Resource and Handle Leaks, Missing Parameter and Option Validation, and Null Pointer Dereferences | `src/libged (Batch 28: tests/check_prim_cmds, tests/create, tests/draw)` | `FIXED` | In BRL-CAD libged Batch 28 test suites and drivers: in tests/check_prim_cmds.cpp, guarded argc and argv in main and checked empty ftp->ft_label string; in tests/create/create_parity.c, added null checks in case_covered and check_coverage, fixed handle leak in open_test_db by closing wdbp with wdb_close instead of leaking wdbp via raw db_close, guarded gedp, gedp->dbip, name, and out in snapshot, guarded argc and argv in main, and ensured temporary test database files are deleted on all exit paths; in tests/create/create_parity.h, verified interface header clean; in tests/create/in_cases.c and make_cases.c, added null guards on gedp, name, and label in build_obj and make_obj, and added null checks in trans_exempt and extra_checks; in tests/draw/aet.cpp, guarded gedp, dbi_state, view counts, and display manager pointers in dm_refresh and img_cmp, freed tname on error exits, guarded argc and argv in main, validated option parsing results, freed fname, deleted temporary database moss_aet_tmp.g, and cleared local cache directory lcache on exit; in tests/draw/annotate.cpp, fixed handle leak in verify_geometry_update by ensuring wdb_close is called on wdbp, guarded gedp and gedp->dbip in verify_legacy_annotation_coloring, and guarded argc and argv in main; in tests/draw/basic.cpp and faceplate.cpp, fixed critical logic bug where if (uac == -1 || need_help) had an empty statement body which inverted command-line argument validation logic, guarded ac and av in main, guarded gedp across poly_* helper functions, freed fname, deleted temporary moss_tmp.g, and cleared lcache on exit; and in tests/draw/draw_color.cpp, guarded argv in main, guarded fixture path, and added null checks on gedp, gedp internals, display structures, and directory pointers in check_drawing. |
|
||||
| `SEC-0271` | **Sev 2** | Logic Bugs, Temporary File and Resource Leaks, Double-Free, Missing Option and Parameter Validation, and Null Pointer Dereferences | `src/libged (Batch 29: tests/draw, tests/edit, ged_test_rm, ged_test_tire, plugins, search_tests, test_bb_tight)` | `FIXED` | In BRL-CAD libged Batch 29 test suites and drivers: in tests/draw/lod.cpp and select.cpp, corrected option parsing check from ac != 2 to uac != 2 so optional command flags such as -c are correctly recognized without causing premature test failure, added null guards on ac, av, gedp, gedp->dbip, v, and v->dmp, freed fname and cleaned up temporary test databases on all exit paths; in tests/draw/quad.cpp, added null checks across drawing and refresh helpers, guarded image comparison against null control and test images, freed cname, corrected option parsing bounds, and ensured temporary database cleanup on exit; in tests/draw/util.cpp, added null guards on dp, u_data, dbi_state, ged_gvp, and dmp, and plugged memory leaks in img_cmp; in tests/edit/test_edit.cpp, replaced invalid jump-over-initialization error path with direct cleanup in create_p0_fixture, replaced manual export and double-free in create_p6_fixture with mk_brep, and ensured all 10 temporary database files (p0_path through p6_path) are unlinked via bu_file_delete across all error and success exits; in tests/ged_test_rm.c, replaced leaking db_close calls with wdb_close, added close_test_db to delete temporary test database files upon completion across all 26 test functions, fixed unchecked db_lookup dereferences, and added null guards in CHECK_PRESENT, CHECK_ABSENT, member_count, comb_has_op, and main; in tests/ged_test_tire.cpp, fixed database handle leaks by properly pairing wdb_fopen with wdb_close, added close_test_db to clean up temporary test databases, unlinked temporary text files and pattern files via bu_file_delete, eliminated premature wdb_close in run_partial_cleanup_case on an unowned handle, and added null checks across inspection helpers; in tests/plugins.cpp, fixed off-by-one / null pointer dereference in error message accessing av[1] instead of av[0], guarded ac and av in main, and added null checks on imsgs and cmds; in tests/search_tests.cpp, added null guards for gedp, gedp->dbip, path_dp, and search_count_helper, and validated argc/argv; and in tests/test_bb_tight.c, fixed wdbp handle leaks in open_test_db, added close_test_db to remove temporary test databases, and added null guards in parse_bb_volume, run_bb_volume, and main. |
|
||||
| `SEC-0272` | **Sev 2** | Resource Leaks, Null Pointer Dereferences, Division by Zero, and Array Overflow | `src/libged (Batch 30: test_bo, test_db, test_gqa, test_list, test_material, test_search, test_select, test_tops, test_view_dir, tire)` | `FIXED` | In BRL-CAD libged Batch 30 test programs and tire command: in test_bo.c, replaced db_close(wdbp->dbip) with wdb_close(wdbp) to fix wdb handle leak, and added null guard on binunif internal pointer before accessing type, count, and data fields; in test_gqa.c, added null check on ged_open return value; in test_list.c, validated atoi result for non-positive values and guarded elapsed_sec > 0 before division to prevent division by zero in ops-per-second calculation; in test_material.c, added null check on ged_open return value and added ged_close before exit to prevent resource leak; in test_search.c, added null check on ged_open return value and added bounds check on variadic plan arguments to prevent overflow of fixed-size cmd[6] array; in test_select.cpp, added null check on ged_open return value, freed DbiState allocation, and cleaned up temporary cache directory with bu_dirclear on exit; in test_tops.c, added null check on ged_open return value; test_db.c reviewed clean; test_view_dir.c reviewed clean; tire/tire.cpp reviewed clean. |
|
||||
| `SEC-0273` | **Sev 2** | Division by Zero, Integer Underflow, and Convention Violations | `src/libged (Batch 31: tire, title, tol)` | `FIXED` | In BRL-CAD libged Batch 31 (tire, title, tol): in tire/tire_surface.cpp, added ZERO() division-by-zero guard; in tire/tire_tread.cpp, added empty vector guard to prevent size_t underflow; in title/title.c, replaced bu_vls_addr with bu_vls_cstr; in tol/tol.c, replaced sscanf with bu_sscanf. Reviewed clean: tire_conic.cpp, tire_csg.cpp, tire_private.h, tire_tread_def.cpp, tire_tread_profile.cpp, tire_wheel.cpp. |
|
||||
| `SEC-0274` | **Sev 2** | Memory Leaks, Resource Leaks, Unsafe API, and Convention Violations | `src/libged (Batch 32: tops, tra, trace, track, tree, typein, unhide, units, v2m_point, vdraw)` | `FIXED` | In BRL-CAD libged Batch 32 (tops through vdraw): in tree/tree.c, fixed memory leak of attribute value set by adding bu_avs_free, fixed resource leak of rt_db_internal on v4gift flatten failure, replaced bu_vls_addr with bu_vls_cstr; in typein/typein.c, fixed resource leaks in extrude_in and revolve_in when imported object is not ID_SKETCH by adding rt_db_free_internal, replaced bu_vls_addr with bu_vls_cstr in revolve_in and pnts_in (4 instances); in units/units.c, replaced bu_vls_addr with bu_vls_cstr; in v2m_point/v2m_point.c, replaced raw sscanf with bu_sscanf (3 instances), fixed copy-paste error in error messages; in vdraw/vdraw.c, replaced raw sscanf with bu_sscanf (7 instances). Reviewed clean: tops.c, tra.c, trace.c, track.c, unhide.c. |
|
||||
| `SEC-0275` | **Sev 2** | Unsafe API and Memory Leaks | `src/libged (Batch 33: view module)` | `FIXED` | In BRL-CAD libged Batch 33 (view module): in view/aet.c, replaced raw sscanf with bu_sscanf (3 sites); in view/align.c, replaced raw sscanf with bu_sscanf (3 sites); in view/center.cpp, replaced raw sscanf with bu_sscanf (3 sites); in view/eye.c, replaced raw sscanf with bu_sscanf (3 sites); in view/faceplate/faceplate.c, added bu_vls_free on stack VLS after bu_opt_color and bu_opt_int calls to prevent memory leaks (4 sites). Reviewed clean: vers.c, autoview.c, autoview2.cpp, axes.c, data_lines.c, faceplate.h, faceplate_axes.c, faceplate_grid.c, interactive_rect.c, ged_view.h. |
|
||||
| `SEC-0276` | **Sev 2** | Memory Leaks, Logic Bugs, Out-of-bounds Array Access, Resource Leaks, Unsafe API, and Missing Validation | `src/libged (Batch 34: view module: gobjs through ypr)` | `FIXED` | In BRL-CAD libged Batch 34 (view module: gobjs through ypr): in view/gobjs.cpp, fixed memory leaks of full path and internal objects in create command and scene free callback, and checked database open; in view/labels.c and view/lines.c, guarded against null scene object creation and used bu_vls_sprintf to prevent vls buffer leaks; in view/lod.cpp, validated database open before cache commands, checked wdb handle, fixed copy-paste error in scale message, and removed dead vls variables; in view/lookat.c, replaced raw sscanf with bu_sscanf (3 sites), guarded against zero vector division when lookat point is at eye position, and added missing newlines; in view/objs.cpp, fixed memory leak of directory pointers in _view_cmd_old_obj across all return paths, guarded against null ged internals, removed redundant recurse check, and fixed argument reporting in arrow subcommand; in view/polygons.c, fixed out-of-bounds argv index in overlap subcommand (argv[1] -> argv[0]), fixed error message reporting in bool subcommand (argv[0] -> argv[1]), checked database open before overlap tolerance check, and formatted s_name with bu_vls_sprintf; in view/quat.c, replaced raw sscanf with bu_sscanf (4 sites) and added missing newlines; in view/qvrot.c, replaced raw sscanf with bu_sscanf (4 sites), corrected argument reporting for bad angle from argv[1] to argv[4], and added missing newlines; in view/saveview.c, replaced bu_vls_addr with bu_vls_cstr, guarded display list traversal against null pointers, and added missing newlines; in view/size.c, replaced raw sscanf with bu_sscanf and added missing newlines; in view/snap.c, fixed critical logic bug where vp was set from uninitialized p instead of parsed 2D coordinates p2d, freed temporary msg vls on all early returns to eliminate memory leak, and added missing newlines; in view/view.c, added missing newlines to usage and error messages; in view/viewdir.c, added missing newline to usage message; in view/ypr.c, replaced raw sscanf with bu_sscanf (3 sites) and added missing newlines. Reviewed clean: knob.c. |
|
||||
| `SEC-0277` | **Sev 2** | Memory Leaks, Resource Leaks, Memory Corruption, Unsafe API, Double Free, Division by Zero, and Missing Validation | `src/libged (Batch 35: view2grid_lu through zoom, completing src/libged)` | `FIXED` | In BRL-CAD libged Batch 35 (completing src/libged subsystem, 21 files): in view2grid_lu.c and view2model_lu.c, moved GED_CHECK_DATABASE_OPEN before b2lval evaluation, replaced raw sscanf with bu_sscanf, guarded against division by zero with ZERO macro in view2model_lu.c, and added missing newlines; in view2model.c, added missing newline to usage; in view2model_vec.c, replaced sscanf with bu_sscanf, checked bn_mat_inverse return, and added newline; in voxelize.c, fixed persistent rt_wdb resource leak with wdb_close, fixed rt_i_destroy leak on error, fixed argument reporting in error message, replaced sscanf with bu_sscanf, added bounds checks on voxel size and level of detail, and fixed format string; in vrot.c, added missing newlines and returned GED_HELP on argc == 1; in vutil.c, fixed memory corruption in ged_dl_hash by passing dp->d_namep string content instead of pointer address, added null guards, and checked bn_mat_inverse return values; in wcodes.c, fixed memory leak of path array on error exits, replaced direct ft_ifree with rt_db_free_internal, guarded null names, and added newlines; in wdb_importFg4Section.c, fixed crash on command reuse by resetting static state variables at start of command, replaced free with bu_free, replaced bu_bomb with error logging, validated line buffer lengths, and added zero face count guard; in whatid.c, verified ID_COMBINATION and added newlines; in which.cpp, replaced sscanf with bu_sscanf, guarded against integer subtraction overflow, capped range to prevent memory exhaustion, freed comb_objs on error, and verified ID_COMBINATION; in which_shader.c, fixed major memory leak of combination records by calling rt_db_free_internal on every iteration, replaced bu_vls_addr with bu_vls_cstr, and added newlines; in who.c, moved GED_CHECK_ARGC_GT_0 to top, replaced bu_vls_addr with bu_vls_cstr, guarded gdlp->dl_dp, and added newlines; in who2.cpp, moved GED_CHECK_ARGC_GT_0 to top, guarded dbis and bvs against null, and added newlines; in who_solids.cpp, checked sp->s_os before accessing s_dmode, moved GED_CHECK_ARGC_GT_0 to top, and guarded gedp internals; in wireframe_eval.c, guarded scene and scene data against null, set op for OP_NOP, fixed memory leak of application struct and ppath in draw_m3, and added null checks in fix_halfs and free_etree; in wmater.c, moved GED_CHECK_ARGC_GT_0 to top, replaced bu_vls_addr with bu_vls_cstr, verified ID_COMBINATION, and added newlines; in xpush.c, eliminated persistent rt_wdb handle leaks in Copy_solid and Copy_comb by using stack tolerance structs, fixed double-free on rt_db_put_internal failure, fixed combination internal memory leak when found is null or comb tree is null, guarded log10 domain, and fixed typo; in zap.c, guarded gedp internals, checked path length before accessing first solid, moved GED_CHECK_ARGC_GT_0 to top, and added newline; in zap2.cpp, freed cvls on help and error returns, guarded views, v, bvs, and v->gv_s against null, and moved GED_CHECK_ARGC_GT_0 to top; in zoom.c, replaced sscanf with bu_sscanf, guarded gedp->ged_gvp and division by zero, moved GED_CHECK_ARGC_GT_0 to top, and added newlines. |
|
||||
| `SEC-0278` | **Sev 2** | Memory Leaks, Resource Leaks, Null Pointer Dereferences, Process Termination, and Missing Validation | `src/libwdb (Batch 36: annot through id)` | `FIXED` | In BRL-CAD libwdb Batch 36 (procedural geometry export, annot through id, 14 files): in annot.c, added null checks on fp, name, and ann, and checked rt_copy_annot return value before export; in arbn.c, validated filep, name, eqn, and checked neqn == 0 to prevent empty/invalid halfspace array export; in ars.c, validated filep, name, curves, and checked ncurves == 0 and pts_per_curve == 0; in bot.c, validated fp, fp->dbip, name, vertices, and faces, checked num_vertices == 0 and num_faces == 0, validated normals and face_normals when num_normals > 0, validated uvs and face_uvs when num_uvs > 0, guarded face_mode bitv duplication, and replaced manual loops with memcpy; in brep.cpp, replaced BU_ASSERT with explicit null validation on file, name, and vbrep, and freed bi on ON_Brep duplication failure; in cline.c, validated fp, name, V, and height, and ensured radius > 0 and thickness >= 0; in constraint.c, validated wdbp and name, and assigned expr to constraint expression when provided; in datum.c, validated wdbp, name, point, and direction in mk_datum, and validated fp, name, and head in mk_datums; in dsp.c, validated filep, name, and stom matrix, checked positive xdim/ydim dimensions, and initialized missing RT_DSP_SRC_FILE datasrc; in dynamic_geometry.c, fixed persistent memory leaks of tmp_name on all success paths in make_hole and make_hole_in_prepped_regions, freed internal database object and soltab on prep failure, called rt_db_free_internal after ft_prep to prevent leaking loaded combination/solid structures, eliminated bu_bomb process terminations, and validated input pointers and dimensions; in ebm.c, validated fp, name, file/binunif, tallness, dimensions, and matrix, and explicitly set RT_EBM_SRC_FILE in mk_ebm; in extrude.c, validated fp, name, sketch_name, V, h, u_vec, and v_vec, and checked height vector magnitude; in id.c, validated fp, fp->dbip, title, and conversion factor across mk_id, mk_id_units, and mk_id_editunits. Reviewed clean: export.c. |
|
||||
| `SEC-0279` | **Sev 2** | Double-Free / Memory Corruption, Memory Leaks, Process Abort, Integer Overflow, and Missing Validation | `src/libwdb (Batch 37: mater through wdb, completing src/libwdb)` | `FIXED` | In BRL-CAD libwdb Batch 37 (procedural primitives, mater through wdb, 13 files, completing src/libwdb): in mater.c, added null checks on ofp and ofp->dbip, and returned -1 on unsupported v4 database rather than asserting mk_version == 4; in material.c, added null checks on wdbp and db_name, guarded against null name, parent, and source strings before bu_vls_strcpy, and validated attribute keys and values before bu_avs_merge to prevent bu_bomb aborts; in nmg.c, added null checks on filep, name, and m before NMG_CK_MODEL, and verified botp != NULL after nmg_bot conversion before export; in nurb.c, added null checks on wdbp, name, and surfs, and verified ni->nsrf > 0 (freeing ni on zero surfaces) before export; in pipe.c, added null checks on fp, name, vertex, and height, verified positive radii with ZERO macro, validated headp in mk_pipe, mk_pipe_free, and mk_pipe_init, and validated od > 0, id >= 0, id < od, and bendradius >= 0 in mk_add_pipe_pnt; in pnts.c, added null checks on pnts and pnts->point in pnts_init_head_pnt and pnts_add, checked scale >= 0.0, and validated point != NULL before adding points in mk_pnts; in reg.c, added null checks on comb and member_hd in mk_tree_pure and mk_tree_gift, guarded headp in mk_freemembers, added null checks on wdbp, combname, and headp in mk_comb, and validated membname in mk_comb1 and mk_region1; in script.c, eliminated Cat 1 memory corruption and caller memory free by allocating and duplicating scr into a newly allocated rt_script_internal before passing to wdb_export; in sketch.c, added null checks on fp, name, and skt, and checked rt_copy_sketch return before export; in submodel.c, added null checks on fp, name, and treetop; in units.c, added null check on str and ZERO() macro guards against zero conversion factor in mk_conversion and mk_set_conversion; in vol.c, added null checks on fp, name, file, cellsize, and mat, and verified positive dimensions and cell sizes; in wdb.c, eliminated memory leaks in mk_hyp by validating parameters before internal structure allocation, replaced bu_bomb in mk_metaball with internal structure cleanup and error return, guarded against integer overflow in mk_binunif allocation and validated data pointer before memcpy, and added null pointer and geometric parameter validation with ZERO macro across mk_half, mk_grip, mk_rpp, mk_wedge, mk_arb4-8, mk_sph, mk_ell, mk_tor, mk_rcc, mk_tgc, mk_cone, mk_trc_h, mk_trc_top, mk_rpc, mk_rhc, mk_epa, mk_ehy, mk_hrt, and mk_eto. |
|
||||
|
||||
|
||||
| `SEC-0280` | **Sev 2** | Buffer Overflow, Double-Free, Logic / Angle Calculation Bug, Memory Leaks, Array Out-of-Bounds, Division by Zero, and Missing Validation | `src/mged (Batch 38: adc through chgtree)` | `FIXED` | In BRL-CAD mged Batch 38 (adc through chgtree, 9 files): in adc.c, fixed stack buffer overflow by capping user_pt coordinate parsing to the 3-element buffer capacity, replaced atof with bu_sscanf, guarded against division by zero in grid_scale across dst, dh, dv, and hv with ZERO macro, fixed incorrect input point parameter in MAT4X3PNT (passing pos_view instead of pos_model), added null pointer guards in adc_set_dirty_flag, adc_set_scroll, adcursor, and f_adc, and replaced bu_vls_addr with bu_vls_cstr; in arbs.c, eliminated double-free on rt_db_put_internal failure and fixed memory leak of internal struct on db_diradd failure and switch default, freed temporary vls on error return, eliminated unused file-scope dead array p_arb3pt and global mutable promp pointer, replaced atof with bu_sscanf, and replaced bu_vls_addr with bu_vls_cstr; in attach.c, made release() name parameter const char *, added null check on s and wp_name in mged_attach, removed redundant null check, and replaced bu_vls_addr with bu_vls_cstr; in axes.c, guarded against aspect division by zero with ZERO macro in draw_v_axes, and added null pointer guards in draw_e_axes, draw_m_axes, and draw_v_axes; in buttons.c, added bounds-checked get_state_str() helper to prevent out-of-bounds array reads on state_str, added null pointer checks in f_press, bv_vrestore, bv_vsave, and bv_adcursor, and replaced bu_vls_addr with bu_vls_cstr; in cad_boundp.c, resolved angle calculation bug where atan2 radian output was multiplied by DEG2RAD instead of RAD2DEG (corrupting bounding polygon angle computations), moved stray debug newline output inside #ifdef DEBUG, migrated memory management to bu_malloc and bu_free, included bu/malloc.h, replaced sscanf with bu_sscanf, and added negative tolerance validation; in cad_parea.c, replaced sscanf with bu_sscanf, and routed error logging from printf to stderr to prevent corrupting redirected stdout files; in chgmodel.c, guarded divisions in f_sc_obj against zero scale denominator and scale accumulators with ZERO macro, validated scale input with bu_sscanf, verified direction vector magnitude squared in f_qorot and corrected inverted error message, replaced sprintf with snprintf and guarded view_state in f_make, and replaced bu_vls_addr with bu_vls_cstr; in chgtree.c, fixed memory leak of internal database struct on db_diradd failure in f_copy_inv, added null guards in find_solid_with_path and find_solid_below_path, ensured lhs, rhs, and both paths are properly freed on all error exit paths in cmd_oed, and replaced bu_vls_addr with bu_vls_cstr. |
|
||||
| `SEC-0281` | **Sev 2** | Stack Buffer Overflow, Out-of-bounds Array Access, Double-Free, Division by Zero, Memory Leaks, and Null Pointer Dereferences | `src/mged (Batch 39: chgview.c, clone.c)` | `FIXED` | In BRL-CAD mged Batch 39 (chgview.c and clone.c, 4,128 lines): in clone.c, fixed stack buffer overflows in get_name by adding field width limits with CPP_XSTR(CLONE_BUFSIZE) to bu_sscanf and replacing raw sscanf with bu_sscanf, fixed double-free and memory leaks of name vls by migrating deallocation from bu_vls_free to bu_vls_vlsfree (since get_name allocates outer struct via bu_vls_vlsinit), fixed out-of-bounds negative array indexing obj_list.names[-1] in copy_v5_comb_tree and copy_v4_comb by validating index_in_list return value (lidx >= 0) before indexing, fixed memory leak of obj_list.names[i].src in copy_object and ensured obj_list is freed across all return paths, fixed memory leaks of internal structures and records in copy_v4_solid, copy_v4_comb, copy_v5_solid, and copy_v5_comb on error paths, fixed potential division by zero in f_tracker by checking n_verts > 1, replaced raw calloc/free with bu_calloc/bu_free, and replaced read-only bu_vls_addr calls with bu_vls_cstr; in chgview.c, guarded against division by zero in cmd_size, mged_vscale, and cmd_sca by checking gv_i_scale with ZERO macro, added null checks on view_state and vs_gvp across cmd_center, cmd_size, size_reset, edit_com, cmd_autoview, f_status, f_refresh, update_all_rate_flags, mged_print_knobvals, knob_apply_misc, f_knob, mged_zoom, cmd_setview, f_slewview, mged_svbase, f_svbase, setview, slewview, f_view_ring, cmd_mrot, cmd_rot, cmd_arot, mged_vscale, and cmd_sca, fixed out-of-bounds argv access in edit_com, bounded state_str array indexing in f_status, replaced sprintf with snprintf in f_regdebug and guarded DMP, fixed early-out memory leak of orig_nargv and vlsargv in f_ill, guarded path_parse against null path, guarded MEDIT(s) and s->s_edit before dereference in mged_librt_knob_edit_apply and mged_escale, and replaced read-only bu_vls_addr calls with bu_vls_cstr. |
|
||||
| `SEC-0282` | **Sev 2** | Memory Leaks, Resource Leak, Out-of-bounds Argument Access, Division by Zero, Duplicate Print Bug, and Null Pointer Dereferences | `src/mged (Batch 40: cmd.cpp, cmd.h)` | `FIXED` | In BRL-CAD mged Batch 40 (cmd.cpp and cmd.h, 3,647 lines): in cmd.h, audited header prototypes and linkage guards (clean); in cmd.cpp, eliminated memory leak in cmd_ged_inside where rt_db_internal intern was transformed but never freed with rt_db_free_internal across all exits, fixed NULL pointer dereference in cmd_ged_inside on illump->s_old.s_Eflag when illump is NULL, eliminated resource leak in cmd_rt_gettrees where rtip was created with rt_i_create but not destroyed with rt_i_destroy on missing geometry argument exit paths, eliminated duplicate window listing print bug in f_tie when called with no arguments, guarded division by zero in cmd_units with ZERO macro on sf, checked argc and argv bounds before indexing in cmd_ged_edit_wrapper, cmd_ged_simulate_wrapper, cmd_ged_in, cmd_ged_more_wrapper, cmd_nmg_collapse, and cmd_get_more_default, added missing error report when window name is not found in cmd_win set, added null pointer checks on view_state, view_state->vs_gvp, s->mged_curr_dm, DMP, illump, and MEDIT(s) across GED wrapper dispatchers, view management, and rendering hooks (cmd_ged_view_wrapper, cmd_ged_dm_wrapper, cmd_screengrab, cmd_blast, f_postscript, f_winset, _view_update_rate_flags_viewonly, and cmd_view), replaced fixed-size snprintf format in f_bomb with sizeof(buffer), and replaced ~45 read-only bu_vls_addr calls with bu_vls_cstr. |
|
||||
| `SEC-0283` | **Sev 2** | Memory Leak, Null Pointer Dereference, Out-of-bounds Array / Argument Access, and Missing Parameter Validation | `src/mged (Batch 41: color_scheme.c, columns.c, dm-generic.c, dodraw.c)` | `FIXED` | In BRL-CAD mged Batch 41 (color_scheme.c, columns.c, dm-generic.c, and dodraw.c, 1,449 lines): in color_scheme.c, added null pointer checks on m_dmp, m_dmp->dm_dmp, s->interp, and color_scheme before dereferencing, ensured error messages are safely reported, and replaced read-only bu_vls_addr calls with bu_vls_cstr; in columns.c, added null pointer guards in vls_col_item and vls_col_eol to prevent crashes on null strings or null buffer pointers, and added symmetric null pointer checks for a, b, *dp1, *dp2, (*dp1)->d_namep, and (*dp2)->d_namep in cmpdirname comparator to prevent qsort crashes; in dm-generic.c, added null checks on s, s->interp, argc, and argv in common_dm and dm_commands, added null guards on rubber_band, mged_variables, s->mged_curr_dm, DMP, view_state, view_state->vs_gvp, s->gedp->ged_gvp->gv_s, adc_state, grid_state, and MEDIT(s) across idle, m, am, adc, con, size, getx, and bg command handlers, checked argc bounds before indexing argv[1..4], replaced raw sscanf with bu_sscanf for RGB background parsing, added null guards in view_state_flag_hook, dirty_hook, zclip_hook, and set_hook_data, and replaced all read-only bu_vls_addr calls with bu_vls_cstr; in dodraw.c, eliminated memory leak in replot_modified_solid where rt_db_internal intern was transformed via transform_editing_solid but never freed when ft_plot failed (< 0), fixed potential NULL pointer dereference and out-of-bounds access in replot_original_solid by validating bdata->s_fullpath.fp_len > 0 and LAST_SOLID(bdata) before dereferencing dp->d_namep, freed existing bdata->s_fullpath with db_free_full_path before duplicating in drawH_part2, guarded s->gedp and ged_dl(s->gedp) against NULL, added null guards in mged_bound_solid, replot_original_solid, replot_modified_solid, add_solid_path_to_result, and redraw_visible_objects, and replaced read-only bu_vls_addr calls with bu_vls_cstr. |
|
||||
| `SEC-0284` | **Sev 2** | Division by Zero, Null Pointer Dereference, and Out-of-bounds Argument Access | `src/mged (Batch 42: doevent.c, dozoom.c)` | `FIXED` | In BRL-CAD mged Batch 42 (doevent.c and dozoom.c, 1,064 lines): in doevent.c, guarded against division by zero in motion_event_handler by clamping window width and height to positive values (width <= 0 ? 1 : width, height <= 0 ? 1 : height) and checking dm_get_aspect with ZERO macro before dividing, added null checks on s, eventPtr, s->mged_curr_dm, and DMP in mged_dm_motion and doEvent, added null guards on rubber_band, grid_state, MEDIT(s), adc_state, view_state, and view_state->vs_gvp across all AMM modes (AMM_IDLE, AMM_ROT, AMM_TRAN, AMM_SCALE, AMM_ADC_*, AMM_CON_*), guarded MEDIT in reset_edflag, and replaced read-only bu_vls_addr calls with bu_vls_cstr; in dozoom.c, eliminated critical division by zero in dozoom perspective calculation where to_eye_scr divided by tan(perspective) without verifying tan != 0 by checking tan value with ZERO macro and using fallback large distance, guarded against division by zero when adjusting inv_viewsize by checking MEDIT(s)->model_changes[15] with ZERO macro, added null checks on s, s->mged_curr_dm, DMP, view_state, view_state->vs_gvp, s->gedp, MEDIT(s), mged_variables, and color_scheme in dozoom, guarded transparency access (sp->s_os->transparency) against null sp->s_os in create_dlist_solid, added null pointer guards in createDLists, create_dlist_solid, createDListSolid, create_dlist_all, createDListAll, free_dlists, and freeDListsAll, and validated active_dm_set display managers and variables. |
|
||||
| `SEC-0285` | **Sev 2** | Inverted Logic Bug, Double-Free, Memory Corruption / Type Mismatch, Resource Leaks, Division by Zero, and Null Pointer Dereferences | `src/mged (Batch 43: edsol.c, f_cmd.h)` | `FIXED` | In BRL-CAD mged Batch 43 (edsol.c and f_cmd.h, 2,324 lines): in f_cmd.h, audited extern command function prototypes (clean); in edsol.c, fixed critical inverted logic bug in ecmd_bot_thick_clbk where face_state > -1 mistakenly triggered error branch and face_state < 0 updated face 0, eliminated double-free in sedit_apply where rt_db_put_internal already frees es_int on all outcomes, fixed reset sequencing in f_sedit_reset where rt_db_free_internal was called before ft_prim_edit_reset zeroing primitive type ID, fixed inverted condition in f_get_sedit (illump || !illump->s_u_data) that caused command to always fail, prevented memory corruption in f_put_sedit by returning TCL_ERROR on functab mismatch rather than executing bu_structparse_argv with wrong structure layout, guarded against division by zero in mged_param with ZERO macro on viewscale, clamped input parameter count to RT_EDIT_MAXPARA, eliminated memory leaks of vls commands on early returns in get_sketch_name, ecmd_extrude_skt_name_clbk, and f_get_sedit_menus, replaced raw atof/atoi with bu_sscanf, verified bn_mat_inverse return in oedit_apply and f_oedit_apply, added primitive type bounds validation (ID_NULL < id <= ID_MAX_SOLID), and added extensive NULL guards on s, MEDIT(s), view_state, DMP, and bdata across all solid and object editing routines. |
|
||||
| `SEC-0286` | **Sev 2** | Out-of-bounds Array / Buffer Access, Uninitialized Variables, Division by Zero, Resource Leaks, and Null Pointer Dereferences | `src/mged (Batch 44: f_db.c, facedef.c)` | `FIXED` | In BRL-CAD mged Batch 44 (f_db.c and facedef.c, 984 lines): in f_db.c, guarded against NULL pointer dereferences on s, gedp, ctx, argv, interpreter, and dbip across _post_opendb_failed, callbacks, f_opendb, and f_closedb, eliminated uninitialized buffer reads when bu_fgets returns EOF, checked Tcl result string validity before indexing, guarded curr_cmd_list before setting more_default, verified argc >= 2 before stripping trailing y/n database creation flags, and replaced all bu_vls_addr calls with bu_vls_cstr; in facedef.c, initialized plane equation index to -1 and added explicit range validation (plane >= 0 && plane < 6) to prevent out-of-bounds array writes, added upper and lower bounds checks on argc-derived array indexing into p_pleqn, p_3pts, p_rotfb, and p_nupnt arrays to prevent out-of-bounds reads, guarded against division by zero in get_pleqn using ZERO macro on vector magnitude before unitizing, replaced raw atof and atoi with bu_sscanf with return validation, added NULL pointer checks on arbo, s, MEDIT(s), and interp, freed error_msg VLS on all exit paths, and replaced bu_vls_addr calls with bu_vls_cstr. |
|
||||
| `SEC-0287` | **Sev 2** | Buffer Over-read, Mismatched Framebuffer Routine, Division by Zero, Infinite Loop / UI Hang, and Null Pointer Dereferences | `src/mged (Batch 45: fbserv.c, grid.c)` | `FIXED` | In BRL-CAD mged Batch 45 (fbserv.c and grid.c, 1,754 lines): in fbserv.c, fixed critical bug in fb_server_fb_bwwriterect where fb_writerect (RGB, 3 bytes/pixel) was called instead of fb_bwwriterect (monochrome, 1 byte/pixel) causing out-of-bounds heap over-reads and image corruption; added packet length and payload dimension validation across all framebuffer network handlers (fb_clear, fb_read, fb_write, fb_readrect, fb_writerect, fb_bwreadrect, fb_bwwriterect, fb_cursor, fb_setcursor, fb_scursor, fb_window, fb_zoom, fb_view, fb_wmap, fb_help) preventing buffer over-reads on truncated or malformed network packets; clamped absurd pixel requests (up to 8192x8192); handled malloc failures with 0-length error packets to prevent client hangs; replaced bu_strlcpy with bounded memcpy for binary auth token packets; added NULL pointer checks on pcp, s, s->mged_curr_dm, DMP, and fbp across all routines; in grid.c, guarded divisions against zero in draw_grid, snap_to_grid, and round_to_grid using ZERO macro on scale and aspect ratio; guarded against integer division by zero and infinite loops when res_major_h or res_major_v <= 0; clamped maximum grid dots (nv_dots, nh_dots <= 2000) to prevent denial-of-service UI hangs; added NULL pointer checks on s, s->mged_curr_dm, s->dbip, grid_state, view_state, view_state->vs_gvp, color_scheme, and s->interp across all callbacks and snap routines; and replaced all read-only bu_vls_addr calls with bu_vls_cstr. |
|
||||
| `SEC-0288` | **Sev 2** | Memory Leak, Out-of-bounds Array / Buffer Access, Dead / Unused Code, and Null Pointer Dereferences | `src/mged (Batch 46: history.c, mater.c, menu.c, menu.h)` | `FIXED` | In BRL-CAD mged Batch 46 (history.c, mater.c, menu.c, and menu.h, 1,086 lines): in history.c, eliminated guaranteed memory leak in f_history by freeing dynamic VLS str across all normal and error exit paths; guarded against out-of-bounds buffer reads in f_journal by replacing single-byte string indexing with BU_STR_EQUAL(argv[1], "-d"); safely handled empty command string lengths in cmd_hist; added NULL pointer checks on cmdp, curr_cmd_list, curr_cmd_list->cl_cur_hist, journalfp, hptr, argv, and interp across history_record, history_journalize, f_journal, f_history, history_prev, history_cur, history_next, and cmd_hist; cleared dangling cl_cur_hist pointer in history_cleanup; replaced all read-only bu_vls_addr calls with bu_vls_cstr; in mater.c, added NULL pointer checks on s, s->gedp, ged_dl, dbip, and DMP in mged_color_soltab before dereferencing; in menu.c, eliminated dead/unused Tcl_DString variables in mged_mmenu_set and mmenu_set; added strict index bounds validation (index >= 0 && index < NMENU) in mmenu_set, mmenu_set_all, and cmd_mmenu_get to prevent out-of-bounds memory writes and reads; removed unsafe static storage duration from loop counters menu and item in mmenu_display and mmenu_select to prevent re-entrancy issues; added NULL checks on mptr->menu_string before indexing; added comprehensive NULL pointer guards on s, s->mged_curr_dm, DMP, menu_state, color_scheme, mged_variables, interp, and active_dm_set display managers across btn_item_hit, btn_head_menu, chg_l2menu, cmd_mmenu_get, mmenu_init, mged_menu_refresh, mged_mmenu_set, mmenu_set, mmenu_set_all, mged_highlight_menu_item, mmenu_display, and mmenu_select; and replaced all read-only bu_vls_addr calls with bu_vls_cstr; in menu.h, corrected header guard comment typo. |
|
||||
| `SEC-0289` | **Sev 2** | Division by Zero, Memory Leaks, Dead Variable, Out-of-bounds Access, and Null Pointer Dereferences | `src/mged (Batch 47: mged.c)` | `FIXED` | In BRL-CAD mged Batch 47 (mged.c, 3,532 lines): eliminated floating-point division by zero in event_check when view_state->k.sca == 10.0 (where 1.0 / (1.0 - (view_state->k.sca / 10.0)) evaluated with 0.0 denominator) by validating denominator with ZERO macro; eliminated Tcl_DString memory leak in stdin_input on EOF return under non-cbreak mode; eliminated dead variable place and unused sprintf in mged_finish; guarded s->s_edit before rt_edit_destroy in mged_finish; guarded DMP and dm_bg before array indexing dm_bg[0..2] in main; guarded s->gedp before checking ged_subp table in main; added null pointer checks on s, s->s_edit, MEDIT(s), s->interp, view_state, view_state->vs_gvp, s->mged_curr_dm, DMP, curr_cmd_list, sd, and active display managers across mged_process_char, event_check, stdin_input, std_out_or_err, refresh, mged_finish, apply_cli_overrides, and main; added input_str_index bounds validation in mged_process_char; replaced raw sscanf with bu_sscanf in parse_debug_uint; and replaced all (~45) read-only bu_vls_addr calls with bu_vls_cstr. |
|
||||
| `SEC-0290` | **Sev 2** | Uninitialized Memory, Missing Header Guards, Duplicate Code, Division by Zero, Resource Leak, and Null Pointer Dereferences | `src/mged (Batch 48: mged.h, mged_dm.h, mged_impl.cpp, mged_impl.h, mged_wdb.h)` | `FIXED` | In BRL-CAD mged Batch 48 (mged.h, mged_dm.h, mged_impl.cpp, mged_impl.h, mged_wdb.h, 1,610 lines): in mged_impl.cpp, zero-initialized allocated mged_state using memset to eliminate widespread uninitialized struct pointers and flags; refactored mged_state_create to call mged_state_init_internals, eliminating duplicate 18 callback registrations (DRY); in mged_state_destroy, guarded search_snapshot, dpy_string, s_edit, and s_edit->e before destroying and delegated internal destruction to mged_state_destroy_internals; cleared cmd_map in MGED_Internal destructor; guarded internal callback map lookups, registrations, and sync against null pointers and uninitialized state in mged_internal_clbk_map, mged_state_clbk_set, mged_state_clbk_get, and mged_edit_clbk_sync; in mged.h, guarded s, s->interp, and s->dbip in CHECK_DBI_NULL and CHECK_READ_ONLY macros to prevent null pointer crashes; in mged_dm.h, converted GET_MGED_DM macro to do-while(0) and guarded tp and tp->dm_dmp before dm_get_id to prevent null pointer dereference; guarded VIEWFACTOR against division by zero with ZERO macro; in mged_impl.h, added standard header guard #ifndef MGED_MGED_IMPL_H; in mged_wdb.h, wrapped extern declarations with __BEGIN_DECLS / __END_DECLS for standard C linkage when included in C++ translation units. |
|
||||
| `SEC-0291` | **Sev 2** | Double-Free, File Descriptor Double-Close / Leaks, Logic Bugs, Memory Leaks, Division by Zero, and Null Pointer Dereferences | `src/mged (Batch 49: mover.c, overlay.c, plot.c, predictor.c, rect.c)` | `FIXED` | In BRL-CAD mged Batch 49 (mover.c, overlay.c, plot.c, predictor.c, rect.c, 1,179 lines): in mover.c, eliminated double-free in moveHobj and moveHinstance where rt_db_free_internal was called after rt_db_put_internal failure (which already frees internal database object on all outcomes), fixed memory leak in moveHinstance when combination tree is empty or object is not a combination by calling rt_db_free_internal, initialized internal database object with RT_DB_INTERNAL_INIT, and added null pointer checks on s, dbip, cdp, dp, xlate, and interp; in overlay.c, added null checks on ctp, s, gedp, mged_curr_dm, and DMP, replaced read-only bu_vls_addr with bu_vls_cstr, and explicitly returned TCL_OK; in plot.c, eliminated file descriptor double-close bug where close(fd1[1]) and close(fd3[0]) were executed after fclose(fp_w) and fclose(fp_r), fixed file descriptor leaks when subsequent pipe() calls fail, handled fork() failures gracefully, added _exit(1) after execlp calls to prevent child processes from continuing parent execution on exec failure, verified fp_w and fp_r after fdopen, guarded view_state and vs_gvp before matrix multiplication, replaced sprintf with snprintf, and replaced bu_vls_addr with bu_vls_cstr; in predictor.c, fixed logic bug in poly_trail where t1->t_nused <= 0 was checked twice instead of validating t2->t_nused, guarded division by zero in predictor_frame when frametime is zero using ZERO macro, and added null pointer checks across init_trail, push_trail, poly_trail, predictor_init, predictor_kill, predictor_frame, and predictor_hook; in rect.c, fixed critical crash in zoom_rect_area where rb_set_dirty_flag was passed NULL data causing MGED_CK_STATE abort, guarded against division by zero in rect_image2view when width <= 0, guarded against division by zero in adjust_rect_for_zoom, draw_rect, and zoom_rect_area when window aspect ratio is zero using ZERO macro, replaced bu_vls_addr with bu_vls_cstr, and added null pointer checks on s, mged_curr_dm, DMP, rubber_band, color_scheme, and interp. |
|
||||
| `SEC-0292` | **Sev 2** | Loop Index Typo / Premature DList Deallocation, File Descriptor Leaks on Interrupt, Array Out-of-Bounds, Division by Zero, and Null Pointer Dereferences | `src/mged (Batch 50: rtif.c, scroll.c, sedit.h, set.c)` | `FIXED` | In BRL-CAD mged Batch 50 (rtif.c, scroll.c, sedit.h, set.c, 1,762 lines): in set.c, fixed critical bug in set_dlist where inner loop searching for active display managers sharing display lists used outer index di instead of dj in BU_PTBL_GET and checked uninitialized dlp2, causing the search to always fail and prematurely free active display lists in other display managers; guarded display list scene object list against empty list reads when freeing display lists; guarded against division by zero in set_absolute_model_tran when view scale is zero using ZERO macro; clamped perspective_angle to valid table indices [0..3] in establish_perspective and toggle_perspective preventing out-of-bounds array reads; guarded s, s->s_edit, and MEDIT(s) before syncing mv_context; guarded multi-level pointers in unset_var before dereferencing; guarded active display managers and DMP in set_dirty_flag and set_scroll_private; in rtif.c, fixed file descriptor leak in f_rmats when interrupted via setjmp by ensuring fp is closed before returning; validated and guarded vector list vertices (vp->nused > 0) preventing negative array indexing; added null pointer checks on s, s->gedp, view_state, view_state->vs_gvp, and interp across cmd_rt, cmd_rrt, rt_read, f_rmats, f_nirt, and f_vnirt; replaced atoi with bu_sscanf; in scroll.c, zero-initialized all elements of dm_scroll_array in set_scroll to guarantee NULL termination and bounded scroll_array pointer traversal by array capacity in scroll_display and scroll_select, preventing out-of-bounds array reads; extracted apply_sl_tol helper to eliminate duplicated tolerance thresholding logic (DRY); added null pointer checks on s, s->interp, view_state, DMP, color_scheme, and mged_variables across all event handlers and display routines; in sedit.h, guarded s, s->s_edit, and s->s_edit->e in SEDIT_ROTATE, SEDIT_TRAN, SEDIT_SCALE, and SEDIT_PICK, and guarded s in OEDIT_ROTATE, OEDIT_TRAN, and OEDIT_SCALE macros, preventing null pointer dereference crashes throughout solid and object editing; and replaced all read-only bu_vls_addr calls with bu_vls_cstr. |
|
||||
| `SEC-0293` | **Sev 2** | Resource Leaks, Wrong Memory Deallocation Bug, Double-Open / File Descriptor Leaks, Array Out-of-Bounds, and Null Pointer Dereferences | `src/mged (Batch 51: setup.c, share.c, tclsync.c, tedit.c)` | `FIXED` | In BRL-CAD mged Batch 51 (setup.c, share.c, tclsync.c, tedit.c, 1,978 lines): in share.c, fixed critical bug in usurp_all_resources where freeing a zero-refcount display list state freed MGED_STATE->mged_curr_dm->dm_dlist_state instead of dlp2->dm_dlist_state, corrupting active display manager memory and leaking dlp2 resources; added null checks on dlp1, dlp2, and resource pointers in SHARE_RESOURCE macro; guarded all resource pointers in free_all_resources before decrementing refcounts and freeing, and nullified pointers after cleanup; added null checks on ctp, s, interpreter, and argv in f_share and f_rset; guarded active display managers and pathname lookups in f_share and share_dlist against null pointers; guarded s->mged_curr_dm in f_rset; in tedit.c, fixed file descriptor leak and concurrent double-opening of temporary files by passing bu_temp_file's open file handle directly to writesolid, flushing and closing before invoking external editor; eliminated memory leak of vls buffer in writesolid; bounded primitive type idb_type between ID_NULL and ID_MAX_SOLID before indexing EDOBJ dispatch table in writesolid and readsolid to prevent out-of-bounds memory access; made writesolid, readsolid, and editit static to minimize scope; guarded s, gedp, s_edit, MEDIT(s), view_state, and interp; in setup.c, guarded ctp, s, interp, and ctp->tcl_func in mged_cmd_dispatch; guarded argv[0] in quit usage message; guarded s and interp in cmd_setup; guarded s and view_state before setting vs_flag in mged_refresh_handler_impl and allocating vs_gvp in mged_setup; in tclsync.c, guarded interp, objc, objv, snapshot, record, and strings across EvalWords, ResultCopy, QualifiedPattern, AppendRecord, AppendProc, AppendProcs, AppendVariable, AppendVariables, AppendNamespace, AppendAliases, BuildInterpSnapshot, ReplayRecord, and ReplayInterpSnapshot; and replaced all read-only bu_vls_addr calls with bu_vls_cstr. |
|
||||
| `SEC-0294` | **Sev 2** | Division by Zero, Stack Buffer Overrun Risk, String Mutation Bug, Unbounded Array Access, and Null Pointer Dereferences | `src/mged (Batch 52: titles.c, track.c, update.c)` | `FIXED` | In BRL-CAD mged Batch 52 (titles.c, track.c, update.c, 1,871 lines): in titles.c, eliminated floating-point division by zero in framerate calculation when frametime is zero using ZERO macro; eliminated in-place destructive mutation of caller's VLS buffer and dropped trailing lines in screen_vls by drawing lines via temporary buffer; bounded global_editing_state array indexing into state_str to prevent out-of-bounds reads; bounded solid type indexing into OBJ array and guarded ft_name before displaying keypoint; guarded MEDIT(s) against NULL before accessing model_changes and e_keypoint; guarded illump against NULL before checking s_old.s_Eflag; guarded s, s->mged_curr_dm, DMP, view_state, view_state->vs_gvp, and s->interp across create_text_overlay and dotitles; replaced sprintf with snprintf; replaced all read-only bu_vls_addr calls with bu_vls_cstr; in track.c, eliminated division by zero in slope when del[0] or slope is zero using ZERO macro and SMALL_FASTF; eliminated division by zero in crdummy when plano[0] - w[0] is zero using ZERO macro; eliminated multiple divisions by zero in top when magnitude of del is zero; clamped cosine values before acos in tancir to prevent NaN return; replaced unsafe custom track_itoa with snprintf; increased solid/region/group name buffers from 9-12 to 32 bytes to prevent name truncation; replaced raw atof with bu_sscanf; scoped all helper functions (crname, slope, crdummy, trcurve, bottom, top, crregion, track_itoa, wrobj, tancir) to static; guarded s, s->dbip, s->wdbp, and s->interp; in update.c, guarded s in mged_update and f_update against NULL pointer dereference; replaced raw sscanf with bu_sscanf; guarded donePtr and eventPtr in event callbacks; guarded clientData, s, interp, and argv[0..2] in f_wait; and replaced bu_vls_addr with bu_vls_cstr. |
|
||||
| `SEC-0295` | **Sev 2** | Memory Leaks, Dangling Database Pointers, Dead Pre-libged Code, Out-of-bounds Array Access, Command Argument Parsing Bug, In-place String Mutation, and Null Pointer Dereferences | `src/mged (Batch 53: usepen.c, utility1.c, vparse.c, wdb_obj.c)` | `FIXED` | In BRL-CAD mged Batch 53 (usepen.c, utility1.c, vparse.c, wdb_obj.c, 3,149 lines): completing all 55 files of src/mged (100% complete): in usepen.c, eliminated dangerous in-place mutation of argv[1] string in f_matpick by copying into a local buffer before splitting slash path; removed static storage duration from transformation matrices t1 and t2 in wrt_view to make the function re-entrant; guarded against null pointers in illump before accessing s_u_data in f_matpick; guarded s, s->mged_curr_dm, s->gedp, ged_dl(s->gedp), DMP, illump, and illum_gdlp across illuminate, f_aip, and f_matpick; guarded argv[1] against null/empty strings; replaced raw sprintf with snprintf; and replaced all read-only bu_vls_addr calls with bu_vls_cstr; in utility1.c, eliminated over 200 lines of dead pre-libged code, including obsolete unused global variables (path, identt, idbuf, operate, regflag, lastmemb, old_or_new, oper_ok, numsol, numreg, idfd, rd_idfd, tabptr, ctemp) and unused functions/structs (printcodes, Do_printnode, check, id_names, id_to_names); added null checks on s and s->gedp in f_edcolor, f_edcodes, f_edmater, and f_red; and replaced bu_vls_addr with bu_vls_cstr; in vparse.c, added null pointer guards on vls, how_to_parse, structp, argv, and argv[1] across mged_vls_struct_parse and mged_vls_struct_parse_old; in wdb_obj.c, eliminated memory leak of log_str in wdb_track_cmd by adding missing bu_vls_free; fixed database reopen bug in wdb_reopen_cmd where allocating a new wdbp reassigned the local parameter and leaked the new object while leaving callers with a dangling pointer to freed dbip, by updating wdbp->dbip in place; fixed argument index parsing bug in wdb_make_bb_cmd where passing -u caused the bounding routine to treat the new bounding box name as an input object to bound; fixed argument parity condition in wdb_tol_cmd that blocked single-tolerance queries (argc == 2); clamped perpendicularity tolerance to [-1.0, 1.0] before acos to prevent NaN return; fixed wrong return value (returning TCL_OK instead of TCL_ERROR) when object is not an ARB in wdb_move_arb_face_cmd and wdb_rotate_arb_face_cmd; fixed wrong argv indices in error messages in wdb_rotate_arb_face_cmd; dynamically allocated resource structures in wdb_rt_gettrees_cmd eliminating shared static resource state and freeing in wdb_deleteProc_rt; replaced raw sscanf and atof with bu_sscanf; checked floating-point tolerances with ZERO macro; replaced raw sprintf with snprintf; and replaced all (~52) read-only bu_vls_addr calls with bu_vls_cstr. |
|
||||
| `SEC-0296` | **Sev 2** | Memory Leaks, Immediate NULL Pointer Dereference Crash, Resource Leaks, Wrong Memory Deallocation, and Missing Parameter Validation | `src/proc-db (Batch 54: bottest.c, brep_cobb.cpp, brep_cube.cpp, brep_invalid.cpp, brep_simple.cpp, brep_surface.cpp)` | `FIXED` | In BRL-CAD proc-db Batch 54 (bottest.c, brep_cobb.cpp, brep_cube.cpp, brep_invalid.cpp, brep_simple.cpp, brep_surface.cpp, 2,010 lines): in bottest.c, fixed immediate SIGSEGV crash when run without arguments by checking argc > 1 before accessing argv[1]; guarded argv[0] before bu_setprogname; checked outfp after wdb_fopen to prevent NULL dereference on write failure; fixed wrong memory deallocator by replacing bu_free with bu_bitv_free(face_mode); and replaced db_close(outfp->dbip) with wdb_close(outfp) to eliminate struct rt_wdb handle leak; in brep_cobb.cpp, eliminated persistent memory leak of 6 heap-allocated ON_NurbsSurface surfaces in Cobb_Sphere by using stack-allocated surfaces in a unified loop, and deleting ON_BezierSurface; guarded argv[0] before bu_setprogname; checked outfp after wdb_fopen; guarded brep before mk_brep; and replaced db_close(outfp->dbip) with wdb_close(outfp); in brep_cube.cpp, fixed immediate SIGSEGV crash when run without arguments by checking argc > 1 before accessing argv[1]; guarded argv[0]; checked outfp after wdb_fopen; eliminated internal database object memory leak by calling rt_db_free_internal(&ip); guarded brep allocation in MakeTwistedCube; and replaced db_close(outfp->dbip) with wdb_close(outfp); in brep_invalid.cpp, eliminated memory leaks in Cobb_Sphere by stack-allocating ON_NurbsSurface and deleting b1; added null check on c2 before appending to trimming loop; validated plate thickness with bu_sscanf; added standard help flags (-h, -?, --help); checked outfp after wdb_fopen; and replaced db_close(outfp->dbip) with wdb_close(outfp); in brep_simple.cpp, fixed immediate SIGSEGV crash when run without arguments by checking argc > 1 before accessing argv[1]; guarded argv[0]; checked outfp after wdb_fopen; eliminated internal database object memory leak by calling rt_db_free_internal(&ip); guarded brep allocation in MakeTwistedCube; replaced db_close(outfp->dbip) with wdb_close(outfp); and replaced raw printf with bu_log; in brep_surface.cpp, guarded brep and c2d curve allocations; validated thickness argument with bu_sscanf; added standard help flags; checked outfp after wdb_fopen; and replaced db_close(outfp->dbip) with wdb_close(outfp). |
|
||||
| `SEC-0297` | **Sev 2** | Resource Leaks, Immediate NULL Pointer Dereference Crash, Division by Zero, Missing Argument Validation, and Memory Leaks | `src/proc-db (Batch 55: brep_trimmed.cpp, breplicator.cpp, brickwall.c, cchannel.c, clutter.c, common.c)` | `FIXED` | In BRL-CAD proc-db Batch 55 (brep_trimmed.cpp, breplicator.cpp, brickwall.c, cchannel.c, clutter.c, common.c, 2,535 lines): in brep_trimmed.cpp, guarded ON_Brep allocation in MakeBrepFace against NULL return; guarded argv[0] before bu_setprogname; added standard help flags (-h, -?, --help); replaced unsafe atof with bu_sscanf with error checking; checked outfp after wdb_fopen; and replaced db_close(outfp->dbip) with wdb_close(outfp) to eliminate struct rt_wdb handle leak; in breplicator.cpp, added null check and size check (count >= 8) on points in generate_brep; guarded ON_Brep allocation; fixed immediate SIGSEGV crash when run without arguments by checking argc > 1 before accessing argv[1]; guarded argv[0]; and replaced db_close(wdbp->dbip) with wdb_close(wdbp); in brickwall.c, guarded av and *av in parse_args; guarded argv[0] before bu_setprogname; replaced raw sscanf with bu_sscanf; replaced raw sprintf with snprintf; validated units_conv to prevent division by zero; guarded against division by zero in standalone horizontal spacing when horiz_bricks <= 1; and supported standard clean exit on help flags; in cchannel.c, replaced raw sscanf with bu_sscanf with error validation; used ZERO macro for float zero comparisons; fixed infinite loop vulnerability in addHoles by verifying positive step; replaced sprintf with snprintf; guarded argv[0] before bu_setprogname; removed invalid colons requiring arguments from help options string and supported clean exit on -h/-?; checked outfp after wdb_fopen; guarded domain of sqrt calculation; and replaced db_close(db->dbip) with wdb_close(db); in clutter.c, fixed memory leak of bn_unif random buffer by calling bn_unif_free; guarded argv[0] before bu_setprogname; added help flag handling with clean exit; validated wdb_fopen; replaced sprintf with snprintf; and replaced db_close(outfp->dbip) with wdb_close(outfp); in common.c, added null pointer guard on rgb in get_rgb; added null pointer guards on name, pos, dir_at, headp, and outfp in do_light; and guarded against NaN from unitizing zero vectors. |
|
||||
| `SEC-0298` | **Sev 2** | Memory Leaks, Double Free, Handle Leaks, and Missing Argument Validation | `src/proc-db (Batch 56: csgbrep.cpp, donuts.c, gaia.c, gears.c)` | `FIXED` | In BRL-CAD proc-db Batch 56 (csgbrep.cpp, donuts.c, gaia.c, gears.c, 3,116 lines): in csgbrep.cpp, eliminated external buffer leak ext in write_out with bu_free_external; fixed ON_Brep leak by deleting brep and checking ON_Brep::New; guarded argv[0] before bu_setprogname; supported standard help flags (-h, -?, --help); checked outfp after wdb_fopen; freed extrude.sketch_name and revolve.sketch_name; and replaced db_close(outfp->dbip) with wdb_close(outfp); in donuts.c, replaced unbounded sprintf with snprintf across getName, createLights, createPlane, createEnvironMap, createScene, makeFlake; supported -h and -? in options; replaced raw sscanf with bu_sscanf; fixed inverted logic bug where empty material check tested == 0 instead of != 0; removed undefined fflush(stdin); guarded progname and argv[0]; checked wdb_fopen result fp; freed parameters.materialArray; and replaced db_close(fp->dbip) with wdb_close(fp); in gaia.c, added null pointer guard on path in open_raster_georef; guarded av[0] before bu_setprogname; supported clean help flag exit; replaced atoi and atof with bu_sscanf; and ensured GDAL datasets are closed on texture load failure paths; in gears.c, guarded make_gear against null db_fp and teeth <= 0; eliminated double free risk by freeing scratch arrays verts/lsegs/segments/reverse once and cleaning up gear_head wmembers; guarded av[0]; supported help flags (-h, -?, --help); replaced atof and atoi with bu_sscanf; cleaned up all_head wmembers; and replaced db_close(db_fp->dbip) with wdb_close(db_fp). |
|
||||
| `SEC-0299` | **Sev 2** | Immediate NULL Pointer Dereference Crashes, Uninitialized Memory Access, Memory Leaks, Infinite Loop, and Handle Leaks | `src/proc-db (Batch 57: globe.c, gtimes.c, helicoil.c, kurt.c, lattice.c, lens.c)` | `FIXED` | In BRL-CAD proc-db Batch 57 (globe.c, gtimes.c, helicoil.c, kurt.c, lattice.c, lens.c, 1,910 lines): in globe.c, guarded progname and av[0]; added clean exit on help flags (-h, -?, --help); replaced atof with bu_sscanf; validated stepSize > 0 (eliminating infinite loop denial of service), initialSize > 0, and finalSize > initialSize (eliminating division by zero in shader params); replaced sprintf with snprintf; eliminated persistent leaks of wmember list nodes across loop iterations by calling mk_freemembers(&wm_hd.l) and mk_freemembers(&bigList.l); and replaced db_close(db_fp->dbip) with wdb_close(db_fp) to fix struct rt_wdb handle leak; in gtimes.c, guarded av[0] before bu_setprogname; supported standard help options (-h, -?); replaced atoi with bu_sscanf; guarded against out-of-bounds pointer dereference when no file argument is given; guarded wdbp from wdb_dbopen against NULL; called ged_free(&ged) on every iteration to fix persistent ged container memory leaks; and replaced printf with bu_log; in helicoil.c, guarded build_helix against NULL head and non-positive turns; guarded av[0]; added clean help exit (-h, -?, --help); replaced atoi and atof with bu_sscanf; freed coil_hd and all_hd wmember lists with mk_freemembers; and replaced db_close(db_fp->dbip) with wdb_close(db_fp); in kurt.c, guarded argv[0] before bu_setprogname; added clean exit on help flags; checked outfp after wdb_fopen; in do_cell, guarded vp->v_n < 3 and fixed critical array index bug in sort loop that iterated over nroots instead of vp->v_n (which caused sorting of uninitialized memory); freed head wmembers in make_surface; guarded against division by zero in vector unitize in pnorms and do_light; and replaced db_close(outfp->dbip) with wdb_close(outfp); in lattice.c, guarded subdivide_face against freq < 1 or freq > MAX_FREQ; guarded av[0] before bu_setprogname; supported clean help exit; replaced atoi and atof with bu_sscanf; clamped frequency to MAX_FREQ; freed dome_head, light_head, and all_head wmembers with mk_freemembers; and replaced db_close(db_fp->dbip) with wdb_close(db_fp); in lens.c, fixed immediate SIGSEGV crash when run without filename where av[bu_optind] was NULL and passed to %s in bu_log; checked wdb_fopen return; guarded discriminant and radicand against negative values and ref_ind against zero; freed VLS buffers str, lens_type, and name; freed lensglass and lens wmembers; replaced sscanf with bu_sscanf; and replaced db_close(db_fp->dbip) with wdb_close(db_fp). |
|
||||
| `SEC-0300` | **Sev 2** | Division by Zero, Memory Leaks, Denial of Service via Unbounded Recursion, and Handle Leaks | `src/proc-db (Batch 58: loftwing.c, masonry.c, menger.c)` | `FIXED` | In BRL-CAD proc-db Batch 58 (loftwing.c, masonry.c, menger.c, 2,245 lines): in loftwing.c, guarded naca_eval against negative x and p >= 1.0 (preventing division by zero); guarded naca_outline against npts < 4 and non-positive nupper/nlower; guarded build_loft against NULL pointers and invalid counts; guarded av[0] before bu_setprogname; added clean exit on help flags (-h, -?, --help); replaced atoi and atof with bu_sscanf with error checks; clamped points, stations, blades, span, and chord to valid positive ranges; eliminated persistent memory leaks of wm_hd wmembers across wing and blade branches by calling mk_freemembers; ensured db_fp and allocated buffers are freed on error exits; and replaced db_close(db_fp->dbip) with wdb_close(db_fp) to eliminate struct rt_wdb handle leak; in masonry.c, guarded set_translate and set_rotate with bu_sscanf and initialized coordinates; guarded av and *av in parse_args before bu_path_component; supported standard help exit (-h, -?); replaced raw sscanf and atof with bu_sscanf; guarded studs and span in frame_opening to prevent division by zero; freed s_hd boardseg head and wm_hd wmembers in frame; guarded sheetrock against non-positive dimensions and freed wm_hd wmembers; guarded mortar_brick against non-positive wall/brick dimensions (preventing division by zero) and freed wm_hd wmembers; freed wm_hd wmembers in brick; freed ol_hd opening list and trans_matrix in main; and replaced db_close(db_fd->dbip) with wdb_close(db_fd); in menger.c, guarded comb, depth, width, and height in slice against NULL/invalid extents; in mengerize, guarded against empty pattern or zero repeat; eliminated persistent leaks of levels[slot]->l and final->l wmembers by calling mk_freemembers; guarded av[0] before bu_setprogname; limited repeat to maximum 5 to eliminate denial-of-service memory exhaustion from recursive fractal generation; replaced heap allocation of menger, ground, light0, light1, sponge with stack allocation and freed their wmembers with mk_freemembers; freed boxes VLS container; and replaced db_close(fp->dbip) with wdb_close(fp). |
|
||||
| `SEC-0301` | **Sev 2** | Buffer Over-reads, Out-of-Bounds Memory Access, Memory Leaks, and Handle Leaks | `src/proc-db (Batch 59: metaball.c, molecule.c, nmgmodel.c, parashot.c, pdb-g.cpp)` | `FIXED` | In BRL-CAD proc-db Batch 59 (metaball.c, molecule.c, nmgmodel.c, parashot.c, pdb-g.cpp, 1,761 lines): in metaball.c, guarded make_meatballs against NULL name and non-positive count (eliminating division by zero in sqrt); in mix_balls, called rt_db_free_internal to eliminate persistent internal object memory leaks for every input object; checked wdbp returned by wdb_dbopen; guarded av and av[0] before bu_setprogname; added clean exit 0 on help flags (-h, -?); replaced atoi with bu_sscanf with range validation [1, 1000000]; and replaced db_close(fp->dbip) with wdb_close(fp) to eliminate struct rt_wdb handle leak; in molecule.c, guarded argv[0] before bu_setprogname; supported standard help flags with exit 0 (-h, -?, --help); checked outfp from wdb_fopen against NULL; rewrote read_data to use line-by-line reading with bu_fgets and bu_sscanf to eliminate infinite loop denial of service on non-numeric input; added bounds checking on atom indices and types to eliminate out-of-bounds array reads in atom_list; replaced unsafe sprintf with snprintf; increased s_name buffer to prevent truncation; freed reg_head and head wmembers with mk_freemembers; freed allocated sphere linked list to fix memory leak; and replaced db_close(outfp->dbip) with wdb_close(outfp); in nmgmodel.c, guarded av and *av before bu_path_component; supported clean exit 0 on help flags (-h, -?); freed model m with nmg_km if wdb_fopen fails; and replaced db_close(fdmodel->dbip) with wdb_close(fdmodel); in parashot.c, guarded argv[0] before bu_setprogname; supported clean exit 0 on help flags (-h, -?); replaced raw sscanf, atoi, and atof with bu_sscanf; validated step count and pipe diameter; and replaced db_close(fp->dbip) with wdb_close(fp); in pdb-g.cpp, fixed buffer over-read vulnerability when parsing fixed-column PDB records (ATOM/HETATM) on short lines by trimming newlines and padding lines up to 80 characters with spaces; replaced raw sscanf with bu_sscanf; supported clean help exit (-h, -?, --help); derived default output geometry file if omitted; freed allocated header string with bu_free; freed all_atoms wmembers with mk_freemembers; and replaced db_close(db_fp->dbip) with wdb_close(db_fp). |
|
||||
| `SEC-0302` | **Sev 2** | Free of Memory Not on Heap, Buffer Over-read, Race Condition, Unbounded Recursion, and Memory Leaks | `src/proc-db (Batch 60: pipe.c, pipetest.c, pix2g.c, pyramid.c, ringworld.c)` | `FIXED` | In BRL-CAD proc-db Batch 60 (pipe.c, pipetest.c, pix2g.c, pyramid.c, ringworld.c, 1,641 lines): in pipe.c, clamped Normals dot product to [-1.0, 1.0] before acos to prevent NaN; guarded tangent and cosine denominators against zero with ZERO(); fixed memory leaks and cumulative combination list corruption across pipe and elbow generations by calling mk_freemembers(&head.l) after every mk_lfcomb; guarded argv[0] before bu_setprogname; added clean exit 0 on -h and -?; replaced raw scanf with bu_fgets and bu_sscanf with validation; guarded against NULL pointer dereference in Names() and main() when fewer than two points are read; freed root points linked list; and replaced db_close(fdout->dbip) with wdb_close(fdout); in pipetest.c, fixed critical heap corruption crash (CWE-590: Free of Memory not on the Heap) by dynamically allocating pipe points via mk_pipe_init and mk_add_pipe_pnt instead of passing static array elements to mk_pipe which takes ownership and frees on export; guarded argv[0]; fixed unconditional usage message; supported clean exit 0 on help flags (-h, -?, --help); checked wdb_fopen return; added NULL guards in do_bending and pr_pipe; freed pipe points with mk_pipe_free; and replaced db_close(outfp->dbip) with wdb_close(outfp); in pix2g.c, guarded av[0] before bu_setprogname; supported clean exit 0 on -h, -?, --help; replaced atoi and atof with bu_sscanf with range validation [1, 65536] on dimensions and positive checks on cell/object sizes; prevented buffer over-read (CWE-125) and crash when image buffer is smaller than width * height * 3 by halting with error instead of continuing to read past buffer end; eliminated critical race condition and list corruption across parallel worker threads by acquiring BU_SEM_GENERAL semaphore when modifying global allScanlineList; eliminated persistent leaks of hundreds of thousands of wmember list nodes by calling mk_freemembers on wm_hd, scanlineList, and allScanlineList; and replaced db_close(db_fp->dbip) with wdb_close(db_fp); in pyramid.c, removed unused dead function pnorms; guarded argv[0] before bu_setprogname; supported clean exit 0 on -h, -?, --help; replaced atoi with bu_sscanf and clamped recursion depth to [1, 8] to prevent denial of service from unbounded recursive branching; checked wdb_fopen return; eliminated persistent memory leaks in recursive tree generation by calling mk_freemembers(&head.l); and replaced db_close(outfp->dbip) with wdb_close(outfp); in ringworld.c, guarded argv[0] before bu_setprogname; supported clean exit 0 on -h and -?; checked wdb_fopen return; eliminated wmember list node leaks in mk_sol, mk_ring, and main by calling mk_freemembers(&c.l); and replaced db_close(fp->dbip) with wdb_close(fp). |
|
||||
| `SEC-0303` | **Sev 2** | Memory Leaks, Handle Leaks, Unbounded Recursion Denial of Service, Division by Zero, and Input Validation | `src/proc-db (Batch 61: seashell.c, sketch.c, specimen.c, sphflake.c, spltest.c)` | `FIXED` | In BRL-CAD proc-db Batch 61 (seashell.c, sketch.c, specimen.c, sphflake.c, spltest.c, 2,106 lines): in seashell.c, guarded superformula against n1 == 0 with ZERO() to prevent division by zero in pow(); guarded argv[0] before bu_setprogname; added clean exit 0 on -h, -?, --help; replaced atof and atoi with bu_sscanf with range validation on --turns, --expand, and --res; eliminated persistent wmember list node leaks across combinations by calling mk_freemembers(&all_hd.l); and replaced db_close(db_fp->dbip) with wdb_close(db_fp) to fix struct rt_wdb handle leak; in sketch.c, guarded argv[0] before bu_setprogname; removed dead option parsing block that caused unconditional abort on any argument; supported clean exit 0 on -h, -?, --help; checked outfp returned by wdb_fopen against NULL; freed all_head wmembers with mk_freemembers; and replaced db_close(outfp->dbip) with wdb_close(outfp); in specimen.c, guarded av[0] before bu_setprogname; supported clean exit 0 on -h, -?, --help; replaced atof with bu_sscanf and validated spacing >= 100.0; freed reg_hd wmembers after every specimen shelf region and freed gnd_hd, lt_hd, and all_hd wmembers in main to eliminate widespread heap leaks; and replaced db_close(db_fp->dbip) with wdb_close(db_fp); in sphflake.c, guarded argv[0] before bu_setprogname; supported clean exit 0 on -h, -?, --help; clamped recursion depth to [0, 5] using bu_sscanf to eliminate denial of service from exponential tree explosion; checked fp returned by wdb_fopen against NULL; eliminated massive memory leak by freeing all wmemberArray entries with mk_freemembers before bu_free; removed undefined behavior fflush(stdin) calls; replaced unsafe sprintf and sscanf with snprintf and bu_sscanf; and replaced db_close(fp->dbip) with wdb_close(fp); in spltest.c, guarded argv[0] before bu_setprogname; supported clean exit 0 on -h, -?, --help; guarded make_face against NULL pointers and unsupported order; checked srf returned by nmg_nurb_new_snurb; and replaced db_close(fp->dbip) with wdb_close(fp). |
|
||||
| `SEC-0304` | **Sev 2** | Use-After-Free, Infinite Loops, Memory Leaks, File Descriptor Leak, Handle Leaks, and Missing Input Bounds Checks | `src/proc-db (Batch 62: surfaceintersect.cpp, surfaceintersect.h, tea.c, tea.h, tea_nmg.c)` | `FIXED` | In BRL-CAD proc-db Batch 62 (surfaceintersect.cpp, surfaceintersect.h, tea.c, tea.h, tea_nmg.c, 2,014 lines): in surfaceintersect.cpp, corrected inverted SI_MIN macro; guarded against division by zero in Step when normal cross product magnitude is zero; eliminated unbounded memory leaks and fixed typo in CurveCurveIntersect by properly deleting split curve objects left1/right1/left2/right2 and intersecting right1 with right2; updated SetCurveCurveIntersectionDir to use reference parameter so intersection direction updates are not discarded on copy, enabled the negative dot product branch (dot < 0), fixed typo that wrote m_dirB[0] twice, and made curve parameters const; fixed arguments to SetCurveCurveIntersectionDir in Get_ON_X_Events; capped Jiggle iteration loops in WalkIntersection and GetStartPointsInternal to prevent infinite loop denial of service; in GetStartPointsInternal, eliminated 12 heap-allocated ON_Surface leaks per recursion node and corrected return value accumulator from &= to |=; cleaned up dynamically allocated curves in BrepBrepIntersect before returning; in main(), guarded argv[0] before bu_setprogname, supported clean exit 0 on -h/-?/-help, checked wdb_fopen return, freed all wmembers with mk_freemembers, and replaced db_close(db_fp->dbip) with wdb_close(db_fp) to fix struct rt_wdb handle leak; in tea.h, marked ducks and patches as static const to prevent multiple-definition linker collisions and inadvertent table modification; in tea.c, guarded argv[0] before bu_setprogname, supported clean exit 0 on -h/-?, checked wdb_fopen return, added NULL check in dump_patch, added array bounds checks on patch indices before accessing ducks[], and replaced db_close(outfp->dbip) with wdb_close(outfp); in tea_nmg.c, fixed critical CWE-416 Use-After-Free vulnerability where nmg_m_to_vlist accessed model m after mk_nmg/wdb_export had already freed it by generating the vlist prior to exporting, fixed file descriptor leak by calling fclose(fp) on the plot3 file, freed vlist nodes with BV_FREE_VLIST, guarded argv[0] before bu_setprogname, supported clean exit 0 on -h/-?, checked wdb_fopen return, checked nmg_mm() return, added bounds checks on patch indices, and replaced db_close(outfp->dbip) with wdb_close(outfp). |
|
||||
| `SEC-0305` | **Sev 2** | Memory Leaks, Handle Leaks, Combination List Corruption, File Descriptor Leaks, and Missing Input Bounds Checks | `src/proc-db (Batch 63: terragen.c, torii.c, tube.c, twistedcube.cpp, twistedcube.h)` | `FIXED` | In BRL-CAD proc-db Batch 63 (terragen.c, torii.c, tube.c, twistedcube.cpp, twistedcube.h, 1,474 lines): in terragen.c, guarded av[0] before bu_setprogname, supported clean exit 0 on -h/-?/--help, replaced atoi and atof with bu_sscanf, added cleanup freeing hf and grid and calling wdb_close on sidecar write failure, freed combination members after terrain.r, water.r, sky.r, and all combs with mk_freemembers, and replaced db_close(db_fp->dbip) with wdb_close(db_fp); in torii.c, guarded av[0] before bu_setprogname, supported clean exit 0 on -h/-?/--help, replaced atoi and atof with bu_sscanf, validated rows and cols (clamped 1..200) and major/minor radii to prevent denial-of-service memory/disk exhaustion, freed all_hd wmembers with mk_freemembers on error paths and normal completion, and replaced db_close(db_fp->dbip) with wdb_close(db_fp); in tube.c, guarded argv[0] before bu_setprogname, supported clean exit 0 on -h/-?/--help, checked outfp returned by wdb_fopen against NULL, closed pos_fp with fclose, eliminated combination list corruption and memory leaks across frames by freeing head.l after bg.r and both head.l and ghead.l on every frame iteration with mk_freemembers, freed head.l in build_cyl with mk_freemembers, checked npts <= 0 and bp in build_spline, added bounds check on nsamples (< 1022) to prevent sample array overflow and replaced sscanf with bu_sscanf in read_frame, replaced fscanf with bu_fgets and bu_sscanf in read_pos, guarded against division by zero in xfinddir with ZERO(denom), and replaced db_close(outfp->dbip) with wdb_close(outfp); in twistedcube.cpp, added array bounds checks on from and to vertex indices against brep.m_V.Count() in MakeTwistedCubeEdge, validated face.m_si and checked surface pointer in MakeTwistedCubeTrimmingLoop, checked edge index ei against brep.m_E.Count(), and added NULL check on bi in printPoints; in twistedcube.h, reviewed clean. |
|
||||
| `SEC-0306` | **Sev 2** | Memory Leaks, Handle Leaks, Combination List Corruption, Allocator Mismatches, Double Free, and Uninitialized Macro Member | `src/proc-db (Batch 64: vegetation.c, vegetation.h, voxelize.c, wavy.c, wdb_example.c)` | `FIXED` | In BRL-CAD proc-db Batch 64 (vegetation.c, vegetation.h, voxelize.c, wavy.c, wdb_example.c, 1,995 lines): completing all 55 files of src/proc-db (100% complete): in vegetation.h, fixed uninitialized branchMaxVariation bug in INIT_CHARACTERISTIC_T macro caused by setting dirMaxVariation twice; replaced unsafe sprintf with bu_strlcpy in INIT_OUTPUTCOUNTER_T; in vegetation.c, fixed memory leak of bigList on error in findIntersectors; replaced system free with bu_free on bu_calloc/BU_ALLOC buffers (segList, excluded, included, plant, and structure allocations) to eliminate allocator mismatch; fixed persistent leaks of included and excluded segment lists during growth retries; implemented recursive freeStructure helper to eliminate memory leaks of deeply nested substructures, branches, and segments in destroyPlant; freed oc->combination.l and oc->region.l wmembers with mk_freemembers; guarded argv[0] before bu_setprogname; supported clean exit 0 on -h/-?/--help; replaced atoi, atof, and atol with bu_sscanf with range validation and clamped age [1, 200] to prevent memory/CPU exhaustion; checked fp from wdb_fopen against NULL; and replaced db_close(fp->dbip) with wdb_close(fp); in voxelize.c, guarded av[0] before bu_setprogname; supported clean exit 0 on -h/-?/--help; replaced atoi with bu_sscanf; freed voldata and ebmdata buffers and closed db_fp on sidecar write and primitive creation failures; freed region_hd.l, ebm_hd.l, and all_hd.l wmembers with mk_freemembers; and replaced db_close(db_fp->dbip) with wdb_close(db_fp); in wavy.c, guarded argv[0] before bu_setprogname; fixed option parsing so -h and -? exit 0 cleanly with usage; replaced atof with bu_sscanf; checked outfp returned by wdb_fopen; documented ownership transfer where mk_bspline/wdb_export takes ownership and frees surfaces via rt_nurb_ifree, avoiding double free; and replaced db_close(outfp->dbip) with wdb_close(outfp); in wdb_example.c, guarded av[0] before bu_setprogname; supported clean exit 0 on -h/-?/--help; eliminated combination member leak by freeing wm_hd.l with mk_freemembers; and replaced db_close(db_fp->dbip) with wdb_close(db_fp). |
|
||||
| `SEC-0307` | **Sev 2** | Allocator Mismatch, Memory Leaks, Uninitialized Pointers, and NULL Pointer Dereferences | `src/qged (Batch 65: QgEdApp.cpp, QgEdApp.h, QgEdFilter.cpp, QgEdFilter.h, QgEdMainWindow.cpp, QgEdMainWindow.h)` | `FIXED` | In BRL-CAD qged Batch 65 (QgEdApp.cpp, QgEdApp.h, QgEdFilter.cpp, QgEdFilter.h, QgEdMainWindow.cpp, QgEdMainWindow.h, 1,604 lines): in QgEdApp.cpp, fixed allocator mismatch (CWE-762) by replacing C++ delete on bu_strdup strings with bu_free; fixed memory leak of argv array av allocated with bu_calloc in QgEdApp::run_cmd; added cleanup loop in destructor to free pending tmp_av strings; added NULL pointer checks on p->gedp, p->gedp->ged_io_data, ca->w, and ca->w->console before dereferencing in io handlers; guarded w and w->CurrentView() in run_cmd; guarded el, el->controls, and w->CurrentDisplay() in element_selected; added NULL guards in raytrace callbacks; in QgEdApp.h, audited clean; in QgEdFilter.cpp, added NULL pointer checks on event e and application model pointer c->mdl before accessing interaction_mode; in QgEdFilter.h, audited clean; in QgEdMainWindow.h, removed duplicate QgView.h include, and initialized pointer members console, cad_open, cad_save_settings, and cad_exit to NULL to prevent uninitialized memory reads (CWE-457); in QgEdMainWindow.cpp, added NULL pointer guards on c4 across isValid3D, isDisplayActive, CurrentDisplay, CurrentView, DisplayCheckpoint, DisplayDiff, QuadDisplay, SingleDisplay, and constructor mode switching; added NULL guards on vcw in IndicateRaytraceStart and IndicateRaytraceDone; added NULL guards on w and qApp in widget_active; and added NULL guards on ap->mdl and ap->mdl->gedp in CreateWidgets, ConnectWidgets, and do_dm_init. |
|
||||
| `SEC-0308` | **Sev 2** | Memory Leaks, Uninitialized Pointers, Out-of-bounds Array / Buffer Access, and NULL Pointer Dereferences | `src/qged (Batch 66: QgEdPalette.cpp, QgEdPalette.h, fbserv.cpp, fbserv.h, main.cpp)` | `FIXED` | In BRL-CAD qged Batch 66 (QgEdPalette.cpp, QgEdPalette.h, fbserv.cpp, fbserv.h, main.cpp, 881 lines): in QgEdPalette.cpp, initialized filenames pointer to NULL before bu_file_list and guarded bu_argv_free, added NULL checks on cmd, cmd->i, cmd->i->tool_create, and returned tool element el before inserting into c_map and calling addElement, and guarded selected->button before setStyleSheet; in QgEdPalette.h, audited clean; in fbserv.h, initialized pointer and index members (s = nullptr, ind = -1, fbsp = nullptr) in QFBSocket and fbsp in QFBServer to prevent uninitialized memory access (CWE-457); in fbserv.cpp, guarded fbsp, s, ind bounds, and pkc in QFBSocket::client_handler, checked realloc return before updating pkc_inbuf to prevent NULL dereference on allocation failure, guarded buffer length and bounds (pkc_inend >= 0 && pkc_inend < pkc_inlen) before copying remaining data; in QFBServer::on_Connect, guarded nextPendingConnection return, fbsp, and validated socket descriptor fd >= 0 before pkg_adopt_socket; in qdm_is_listening and qdm_listen_on_port, checked fbsp against NULL; in qdm_open_server_handler and qdm_close_server_handler, guarded fbsp and listener channel nl, and cleared fbsl_chan and fbsl_fd to avoid dangling pointers; in qdm_open_client_handler and qdm_open_sw_client_handler, added client index bounds checks (0 <= i < fbs_max_clients) and guarded data, s->s, and fbsp->fbs_fbp; in qdm_close_client_handler, guarded client index and cleared fbsc_chan to NULL; in QFBIPCSocket::ipc_handler, guarded fbsp, ind bounds, notifier, and fbsc_pkg before client processing; in qdm_open_ipc_client_handler, qdm_open_ipc_sw_client_handler, and qdm_close_ipc_client_handler, added client index bounds checks and guarded fbsp->fbs_fbp; in main.cpp, guarded argc < 1, argv, and argv[0] before bu_setprogname to prevent NULL pointer dereference crashes on empty argument vectors, guarded argv[i] in option scanning loop, eliminated memory leaks of bu_vls msg on error paths and prior to QApplication launch by adding bu_vls_free(&msg). |
|
||||
| `SEC-0309` | **Sev 2** | Illegal Free of Non-Heap Member, Double Free, Memory Leaks, Uninitialized Pointers, Model Invariant Violations, and NULL Pointer Dereferences | `src/qged (Batch 67: plugin.h, QEll.cpp, QEll.h, ell_tool.cpp, CADViewModel.cpp, CADViewModel.h, view_info.cpp)` | `FIXED` | In BRL-CAD qged Batch 67 (plugin.h, QEll.cpp, QEll.h, ell_tool.cpp, CADViewModel.cpp, CADViewModel.h, view_info.cpp, 777 lines): in plugin.h, audited clean; in QEll.h, initialized all pointer member variables to nullptr to prevent uninitialized pointer reads (CWE-457); in QEll.cpp, cleared struct rt_ell_internal ell with memset(&ell, 0, sizeof(ell)) in constructor; connected write_edit and reset_values buttons to their write_to_db and read_from_db slots; in destructor, set p = NULL after bv_obj_put(p); in read_from_db, guarded qApp against NULL and checked ellp against NULL before RT_ELL_CK_MAGIC; in write_to_db, fixed illegal free of non-heap C++ object member &ell (CWE-763/CWE-590) and subsequent double free (CWE-415) by dynamically allocating ellp via BU_ALLOC and relying on rt_db_put_internal's internal deallocation without redundant and dangerous rt_db_free_internal calls; in update_obj_wireframe, guarded qApp, gedp->dbip, p from bv_obj_get, wdbp from wdb_dbopen, child scene object s, and pl[i].str against NULL pointer dereferences; in update_viewobj_name, guarded qApp, gedp->dbip, p, and ell_name against NULL dereferences; in eventFilter, added NULL guard on event pointer e; in ell_tool.cpp, converted heap-allocated QIcon to stack allocation to eliminate memory leak (CWE-401); in CADViewModel.h, audited clean; in CADViewModel.cpp, guarded qApp and bview pointer v against NULL in refresh, and invoked beginResetModel before deleting m_root to preserve Qt model invariants and avoid use-after-free by attached views; set m_root = NULL in destructor; in view_info.cpp, converted heap-allocated QIcon to stack allocation and parented CADViewModel to vview to eliminate memory leaks (CWE-401). |
|
||||
| `SEC-0310` | **Sev 2** | Memory Leaks, Uninitialized Pointers, Argument Indexing Corruption, and NULL Pointer Dereferences | `src/qged (Batch 68: CADViewMeasure.cpp, CADViewMeasure.h, measure.cpp, CADViewSelector.cpp, CADViewSelector.h, select.cpp, CADViewSettings.cpp, CADViewSettings.h, view_settings.cpp)` | `FIXED` | In BRL-CAD qged Batch 68 (CADViewMeasure.cpp, CADViewMeasure.h, measure.cpp, CADViewSelector.cpp, CADViewSelector.h, select.cpp, CADViewSettings.cpp, CADViewSettings.h, view_settings.cpp, 1,374 lines): in CADViewMeasure.h, removed duplicate QLineEdit include and initialized pointer members to nullptr to avoid uninitialized memory reads (CWE-457); in CADViewMeasure.cpp, freed f2d and f3d filters in destructor to fix memory leak (CWE-401); in adjust_text, eliminated persistent memory leak of QLabel on every event by reusing ma_label instead of repeatedly reallocating new QLabel instances; guarded qApp, gedp->ged_gvp, gedp->dbip, mf, and reports against NULL dereferences; in update_color and eventFilter, guarded mf, measure_3d, color_3d, color_2d, and filters; in measure.cpp, converted heap-allocated QIcon to stack allocation to prevent memory leak (CWE-401); in CADViewSelector.h, initialized all pointer members (including filter pointers pf, bf, rf) to nullptr; in CADViewSelector.cpp, freed pf, bf, and rf in destructor to fix memory leak (CWE-401); in select_objs and deselect_objs, guarded gedp, dbi_state, cf, and scene object s against NULL; in erase_objs, fixed indexing bug in av array where NULL scene objects created holes in the argv vector passed to ged_exec_erase, and checked scnt > 1 before execution; in do_draw_selections, do_erase_selections, and do_view_update, guarded dbis->pathstr return before calling bu_strdup and constructing std::string; in eventFilter, added NULL guards on event e, qApp, filters, and checkboxes; in select.cpp, converted heap-allocated QIcon to stack allocation to prevent memory leak (CWE-401); in CADViewSettings.h, initialized all pointer members to nullptr; in CADViewSettings.cpp, added NULL checks on cb in set_ckbx and ckbx_val; in checkbox_refresh and view_refresh, guarded qApp, gedp, bview v, v->gv_s, and fb_mode_combo against NULL pointer dereferences; in view_settings.cpp, converted heap-allocated QIcon to stack allocation to eliminate memory leak (CWE-401). |
|
||||
| `SEC-0311` | **Sev 2** | Memory Leaks, Uninitialized Pointers, and NULL Pointer Dereferences | `src/qged (Batch 69: QPolyCreate.cpp, QPolyCreate.h, QPolySettings.cpp, QPolySettings.h, polygon_tool.cpp)` | `FIXED` | In BRL-CAD qged Batch 69 (QPolyCreate.cpp, QPolyCreate.h, QPolySettings.cpp, QPolySettings.h, polygon_tool.cpp, 1,239 lines): in QPolySettings.h, initialized all pointer member variables to nullptr to eliminate uninitialized pointer access (CWE-457); in QPolySettings.cpp, added explicit QWidget parent to constructor, fixed severe memory leak in uniq_obj_name where ovname and vname were leaked on both collision early exit and success paths (CWE-401), guarded sketch_sync and sketch_name against NULL in sketch_sync_toggled, checked line_snapping and grid_snapping in signal handlers, and guarded p, p->s_i_data, and all UI controls against NULL in settings_sync; in polygon_tool.cpp, stack-allocated QIcon objects in polygon_tool_create and polygon_tool_modify to eliminate heap allocation leaks (CWE-401); in QPolyCreate.h, initialized all pointer member variables to nullptr (CWE-457); in QPolyCreate.cpp, added explicit QWidget parent to constructor, freed pcf in destructor to prevent filter memory leak (CWE-401), guarded qApp, gedp, gedp->dbip, p->s_i_data, and sketch widgets in finalize, guarded qApp, gedp, gedp->ged_gvp, and ps in do_vpoly_copy, guarded qApp, gedp, gedp->dbip, and ps in do_import_sketch, guarded gedp->dbip and sketch controls in sketch_sync to prevent NULL pointer dereferences on uninitialized databases, guarded v->gv_s and scene objects in toggle_line_snapping, toggle_grid_snapping, and checkbox_refresh, and in eventFilter guarded event pointer e, qApp, gedp, pcf, p->s_i_data, and ps settings controls. |
|
||||
| `SEC-0312` | **Sev 2** | Memory Leaks, Uninitialized Pointers, and NULL Pointer Dereferences | `src/qged (Batch 70: QPolyMod.cpp, QPolyMod.h)` | `FIXED` | In BRL-CAD qged Batch 70 (QPolyMod.cpp, QPolyMod.h, 1,124 lines): completing all 34 files of src/qged (100% complete): in QPolyMod.h, initialized all pointer member variables to nullptr (ps, mod_names, select_mode, move_mode, update_mode, general_mode_opts, close_general_poly, append_pnt, select_pnt, csg_modes, apply_bool, viewsnap_poly, remove_poly, p, cf, puf, psf, ppf, pmf) to eliminate uninitialized pointer access (CWE-457); in QPolyMod.cpp, added explicit QWidget parent to constructor, freed mouse filter objects puf, psf, ppf, and pmf in destructor to eliminate memory leaks (CWE-401), guarded qApp and mod_names in mod_names_reset, guarded ip and all UI controls in poly_type_settings, guarded qApp, p, p->s_i_data, and ps settings controls in polygon_update_props, guarded qApp and gedp->ged_gvp in toplevel_config, guarded p and p->s_i_data in clear_pnt_selection, guarded qApp, gedp->ged_gvp, and ps in select, guarded p, p->s_i_data, close_general_poly, and boolean operation objects in toggle_closed_poly, guarded qApp, p, p->s_i_data, gedp->ged_gvp, and csg_modes in apply_bool_op, guarded qApp, p, p->s_i_data, and gedp->ged_gvp in align_to_poly, guarded qApp, p, p->s_i_data, and mod_names in delete_poly, guarded gedp->dbip and sketch controls in sketch_name_edit, checked existing sketch collision and guarded gedp->dbip in sketch_name_update, guarded qApp and ps in view_name_edit and view_name_update, guarded v->gv_s in toggle_line_snapping, toggle_grid_snapping, and checkbox_refresh, and in eventFilter guarded event pointer e, qApp, gedp, filters, p->s_i_data, and UI controls. |
|
||||
| `SEC-0313` | **Sev 2** | Memory Leaks, Uninitialized Pointers, Off-by-one, Missing Header Guard, and NULL Pointer Dereferences | `libqtcad & include/qtcad (Batch 71: 14 files)` | `FIXED` | In BRL-CAD libqtcad Batch 71 (14 files, 1,563 lines): in defines.h, wrapped QTCAD_SLOT and QTCAD_EVENT macro definitions in do-while(0) blocks for safe statement syntax and guarded slot_name and event_name against NULL; in QgSignalFlags.h, added missing #define QGSIGNALFLAGS_H include guard; in QgAccordion.h, made constructors explicit with default nullptr and initialized all pointer members to nullptr; in QgAccordion.cpp, reparented objscrollarea to this, guarded addObject against null pointers and prevented duplicate insertion and redundant signal-slot connections, and guarded against null objects in accordion display loop; in QgAppExecDialog.h, added explicit constructor and destructor declarations and initialized logfile, console, proc, and buttonBox to nullptr; in QgAppExecDialog.cpp, implemented destructor closing and deleting logfile to eliminate persistent memory leaks (CWE-401), deleted logfile on open failure, and guarded proc, console, and buttonBox in read_stdout, read_stderr, process_abort, and process_done to prevent NULL pointer dereferences (CWE-476); in QgAttributesModel.h, modernized constructors and initialized pointers; in QgAttributesModel.cpp, deleted m_root in destructor and prior to allocating a new root in update and do_dbi_update to eliminate severe memory leaks (CWE-401), replaced unsafe bu_avs_remove loop during iteration with canonical bu_avs_free and bu_avs_init_empty, fixed off-by-one error in beginInsertRows (inclusive cnt - 1 bound), guarded against out-of-bounds access in add_Children when color attribute has fewer than 3 components (CWE-125), guarded against NULL strings and nodes, properly nested data updates between beginResetModel and endResetModel, and validated QModelIndex in refresh; in QgColorRGB.h, removed unused dead member d and initialized pointers to nullptr; in QgColorRGB.cpp, reparented child widgets to this, zeroed bu_color structure, used bu_color_from_rgb_chars for direct color synchronization, and guarded against NULL text and button pointers; in QgDockWidget.h, initialized m to nullptr and made constructor explicit; in QgDockWidget.cpp, removed unused map and set headers, guarded event pointer against NULL in event() to prevent crash, and replaced C-style cast with static_cast; in QgFlowLayout.h, initialized spacing members; in QgFlowLayout.cpp, guarded addItem, minimumSize, and doLayout against NULL items, checked widget and style pointers before layoutSpacing to prevent NULL pointer dereference crashes (CWE-476), clamped negative spacing, and returned nullptr in takeAt. |
|
||||
| `SEC-0314` | **Sev 2** | Memory Leaks, Division by Zero, Syntax / Declaration Errors, Missing Header Guards, and NULL Pointer Dereferences | `libqtcad & include/qtcad (Batch 72: 9 files)` | `FIXED` | In BRL-CAD libqtcad Batch 72 (9 files, 1,422 lines): in QgKeyVal.h, initialized pointer members (m_root, parent) to nullptr, added explicit constructors, and added override specifiers; in QgKeyVal.cpp, initialized m_root to nullptr in model constructor to prevent undefined pointer dereferences (CWE-457), guarded curr_node against NULL in data and setData, ordered model reset correctly by calling beginResetModel before updating m_root in setRootNode, checked row bounds against child count before accessing children in index to prevent out-of-bounds reads (CWE-125), guarded node and parent pointers in parent, rowCount, NodeIndex, and NodeRow to prevent NULL pointer dereferences (CWE-476), and guarded string pointers in add_pair; in QgUtil.h, formatted header guard comment; in QgUtil.cpp, eliminated critical memory leak of bu_attribute_value_set in QgCombType by calling bu_avs_free before returning on all paths (CWE-401), guarded dp and dbip in get_arb_type, db_find_subregion, db_find_region, and QgCombType against NULL pointer dereferences, initialized intern structure with RT_DB_INTERNAL_INIT, replaced bu_bomb in db_find_subregion default case with non-fatal logging to prevent application crash on malformed CSG trees (CWE-755), and guarded comb pointer in db_find_region; in bindings.h, added standard QTCAD_BINDINGS_H header guard; in bindings.cpp, guarded against NULL event pointer in CADkeyPressEvent, CADmousePressEvent, CADmouseReleaseEvent, CADmouseMoveEvent, and CADwheelEvent, checked v->gv_s before accessing axes and ADC draw flags to prevent crash on uninitialized views (CWE-476), and prevented division by zero in CADmouseMoveEvent scaling calculation by clamping v->gv_height to a positive value (CWE-369); in QgConsoleListener.h, added standard QGCONSOLELISTENER_H header guard and initialized process, callback, data, and notifier members to nullptr; in QgConsoleListener.cpp, guarded process, process->gedp, and result string against NULL before checking string length or reading results, prevented unsigned integer underflow (CWE-191) on string length subtraction by verifying s2 > s1, safely disabled and disconnected notifier in destructor, and initialized members in constructor initialization list; in QgEdit.h, resolved syntax errors by adding missing semicolons to class declarations, corrected class name consistency (QgVectEdit), closed unclosed comment, made constructors explicit, and initialized pointer members (vx, vy, vz, dbip) to nullptr. |
|
||||
| `SEC-0315` | **Sev 2** | Memory Leaks, Out-of-Bounds Access, Division by Zero, and NULL Pointer Dereferences | `libqtcad & include/qtcad (Batch 73: 8 files)` | `FIXED` | In BRL-CAD libqtcad Batch 73 (QgConsole.h, QgConsole.cpp, QgToolPalette.h, QgToolPalette.cpp, QgTreeSelectionModel.h, QgTreeSelectionModel.cpp, QgTreeView.h, QgTreeView.cpp, 2,342 lines): in QgConsole.h, initialized gedp pointer to nullptr; in QgConsole.cpp, eliminated memory leak of ct and av in GEDShellCompleter when gedp or dbip is null (CWE-401), replaced unsafe C-style cast on parent() with qobject_cast, bounded completionModel indexing, fixed out-of-bounds history indexing in consolidateHistory (CWE-125), eliminated dangling pointer read from temporary toLocal8Bit buffer in historyAt using toStdString (CWE-416), guarded Completer popup against NULL in keyPressEvent, selectCompletion, and updateCompleter, added NULL checks on clipboard and mimeData before text extraction, bounded CommandPosition on Key_Up and Key_Down, guarded CommandHistory against empty back() access in commandBuffer, fixed off-by-one word replacement in insertCompletion, prevented listener memory leak in destructor and listen() (CWE-401), and clamped cursor offsets to document bounds in printStringBeforePrompt; in QgToolPalette.h, initialized all pointer and layout members to nullptr; in QgToolPalette.cpp, guarded iicon in QgToolPaletteButton constructor and setter to prevent NULL dereference crashes (CWE-476), guarded controls in QgToolPaletteElement constructor and setter, implemented destructor in QgToolPalette to delete palette elements and prevent memory leaks (CWE-401), eliminated division by zero in button_layout_resize when width is smaller than icon width (CWE-369), fixed typo in setIconWidth where icon_height was assigned to button width, guarded empty elements set in setAlwaysSelected and deleteElement to prevent out-of-bounds / end-iterator dereference crashes (CWE-125/CWE-476), and guarded controls, scrollbars, and buttons in palette_displayElement; in QgTreeSelectionModel.h, initialized treeview to nullptr; in QgTreeSelectionModel.cpp, added NULL pointer checks on treeview, m, gedp, and dbi_state in clear_all and select slots, checked sv[0] bounds, eliminated heap allocation memory leak of QModelIndexList on every selection event by using stack allocation (CWE-401), and guarded snode against NULL before accessing path_hash and path_items (CWE-476); in QgTreeView.h, initialized model and delegate pointers to nullptr; in QgTreeView.cpp, guarded painter and invalid QModelIndex in gObjDelegate::paint, clamped icon height to prevent invalid image scaling, parented draw_action and erase_action to QMenu in context_menu to eliminate action memory leaks on menu deletion (CWE-401), guarded index, cnode, gedp, and view states in do_draw_toggle, guarded against empty path_hashes before back() and pop_back(), guarded m and items in redo_expansions and redo_highlights, and added NULL checks on model m before emitting layoutChanged. |
|
||||
| `SEC-0316` | **Sev 2** | Memory Leaks, Uninitialized Pointers, Out-of-Bounds Access, and NULL Pointer Dereferences | `libqtcad & include/qtcad (Batch 74: 10 files)` | `FIXED` | In BRL-CAD libqtcad Batch 74 (QgView.h, QgView.cpp, QgViewCtrl.h, QgViewCtrl.cpp, QgGL.h, QgGL.cpp, QgSW.h, QgSW.cpp, QgQuadView.h, QgQuadView.cpp, 2,910 lines): in QgView.h, audited clean; in QgView.cpp, replaced return in switch default with break, set canvas_gl and canvas_sw to NULL after deletion in destructor, guarded add_event_filter against NULL, and in clear_event_filter properly updated filters vector and curr_event_filter while ensuring event filters are removed from both GL and SW canvases; in QgViewCtrl.h, initialized QAction pointer members (sca, rot, tra, center, raytrace, fb_mode, fb_clear) to nullptr; in QgViewCtrl.cpp, guarded gedp in fbclear_cmd, fb_mode_cmd, do_view_update, and raytrace_cmd, checked v->gv_s in fb_mode_cmd and do_view_update to prevent NULL pointer dereferences (CWE-476), guarded callback context vctrl in rt_cmd_start and rt_cmd_done, and guarded raytrace before setIcon in raytrace_start and raytrace_done; in QgGL.h, audited clean; in QgGL.cpp, fixed critical memory leak in destructor by calling bv_free on local_v prior to deallocation and corrected struct name in BU_PUT from struct bv to struct bview (CWE-401), set pointers to NULL upon destruction, guarded fb_get_platform_specific return against NULL before dereferencing fbps->data, guarded dm_bg1 and dm_bg2 before dm_set_bg, checked dmp in mouseReleaseEvent before calling dm_set_dirty, guarded v before bv_hash in stash_hashes and diff_hashes, and checked for null QImage in save_image; in QgSW.h, audited clean; in QgSW.cpp, fixed memory leak in destructor by calling bv_free(local_v) and corrected BU_PUT struct name (CWE-401), guarded dmp against NULL in need_update and paintEvent before calling dm_set_dirty, checked width and height bounds before painting and image allocation, guarded fbps return before setup, guarded dm_bg1 and dm_bg2, checked dm_image against NULL in paintEvent and save_image, checked dmp in mouseReleaseEvent, guarded v before bv_hash in stash_hashes and diff_hashes, and guarded dmp and dm_image in save_image and get_viewport_image; in QgQuadView.h, initialized currentView and gedp to nullptr; in QgQuadView.cpp, guarded gedp and view pointers in constructor, createView, changeToSingleFrame, and changeToQuadFrame, clamped index bounds in createView to prevent out-of-bounds reads on VIEW_NAMES array (CWE-125), guarded chained pointers v->gv_s in changeToQuadFrame, guarded view objects in autoview and draw_scene loops, deleted old layout before creating a new one in createLayout to prevent layout leaks and Qt warnings, guarded currentView in view() and do_view_changed, eliminated unsafe parent geometry lookup in get(QPoint) by using widget-local rect and mapFromGlobal, guarded event e in get(QEvent), and guarded quadrant_id and spacer pointers in select. |
|
||||
| `SEC-0317` | **Sev 2** | Memory Leaks, NaN Domain Errors, Use-After-Free, Division by Zero, and NULL Pointer Dereferences | `libqtcad & include/qtcad (Batch 75: 8 files)` | `FIXED` | In BRL-CAD libqtcad Batch 75 (QgMeasureFilter.h, QgMeasureFilter.cpp, QgPolyFilter.h, QgPolyFilter.cpp, QgSelectFilter.h, QgSelectFilter.cpp, QgSketchFilter.h, QgSketchFilter.cpp, 2,899 lines): in QgMeasureFilter.h, declared virtual destructor in QgMeasureFilter; in QgMeasureFilter.cpp, implemented destructor releasing scene object s, fixed critical logic inversion bug in QgMeasureFilter::angle(bool radians) where radians and degrees were swapped, clamped dot product to [-1.0, 1.0] before acos to prevent NaN domain errors, guarded vector unitization against division by zero with ZERO(mag), added null checks on s after bv_obj_get and cleared s = NULL on reset to prevent use-after-free and null dereferences, guarded v in QMeasure2DFilter::get_point, implemented QMeasure3DFilter destructor to clean and free rt_resource, rtip, and application structures eliminating severe memory leaks (CWE-401), cleaned prior raytrace resources before allocating new ones on prep, guarded ray direction magnitude, and cleaned resources on tree loading failure; in QgPolyFilter.h and QgPolyFilter.cpp, added virtual destructors to base QgPolyFilter and derived classes (QPolyCreateFilter, QPolyUpdateFilter, QPolyMoveFilter) to free bu_ptbl containers bool_objs and move_objs eliminating memory leaks (CWE-401), guarded wp, checked contour existence before indexing contour 0, cleared wp->s_i_data = NULL on freeing unclosed polygon, and guarded bv_create_polygon return, wp->s_v, and wp->s_i_data across event handlers; in QgSelectFilter.h and QgSelectFilter.cpp, declared and implemented virtual destructor in QgSelectFilter to free selected_set with bu_ptbl_free (CWE-401), guarded sset and v in closest_obj_bbox and guarded ray direction unitization against division by zero, guarded v and v->gv_s in QgSelectBoxFilter::eventFilter and prevented division by zero when viewport dimensions are zero, removed debug logging spam, and ensured rt_clean_resource is called before destroying rtip and freeing resp/ap on all paths in QgSelectRayFilter; in QgSketchFilter.h and QgSketchFilter.cpp, added virtual destructor to base QgSketchFilter, guarded output parameters and verified sketch magic in screen_to_uv and snap_vertex_uv, guarded v and es against null in all event filters, verified valid ft_set_edit_mode function pointer before invocation, added bounds check on seg_idx against curve count and deg against RT_EDIT_MAXPARA in sketch_seg_sample, bounded all vertex indices against vert_count, guarded arc direction length against zero in sketch_arc_center_uv, bounded curr_seg and full-circle cs->end in QgSketchArcRadiusFilter, guarded event pointer in QgSketchCursorTracker, and safely extracted curr_seg without null dereference in QgSketchSetTangencyFilter. |
|
||||
|
||||
|
||||
|
||||
| `SEC-0318` | **Sev 2** | Memory Leaks, Uninitialized Pointers, Division by Zero, Model Invariant Violations, and NULL Pointer Dereferences | `libqtcad & include/qtcad (Batch 76: 7 files)` | `FIXED` | In BRL-CAD libqtcad Batch 76 (QgGeomImport.h, QgModel.h, QgGeomImport.cpp, QgModel.cpp, tests/qgmodel.cpp, tests/qgview.cpp, tests/qsketch.cpp, 1,323 lines): in QgModel.h, initialized rootItem to NULL to prevent uninitialized pointer dereference (CWE-457); in QgModel.cpp, fixed severe memory leak in destructor by iterating through and deleting all QgItem allocations in items before deleting container, freed empty_gvp, and safely deleted gedp->dbi_state before calling ged_close (CWE-401), deleted existing rootItem and cleared items on g_update reset, guarded mdl, gedp, and dbi_state in QgItem_cmp to prevent SIGSEGV crashes during sorting, added comprehensive null checks in QgItem constructor and path_hash, guarded mdl, gedp, dbi_state, and dp in update callbacks, guarded node and index in NodeRow, canFetchMore, and fetchMore, guarded qi, gedp, dbi_state, and ged_gvp in data(), validated argc and argv in run_cmd, verified sender QAction cast and guarded cnode in draw/erase actions, and added bounds and null checks in item expand/collapse handlers; in QgGeomImport.h and QgGeomImport.cpp, explicitly marked constructors and initialized all pointer members to NULL across ASCImportDialog, RhinoImportDialog, and STEPImportDialog (CWE-457), reparented dialog widgets to this for proper Qt memory ownership, deleted out_win in exec_console_app_in_window to prevent persistent dialog leaks (CWE-401), guarded bu_dir return before QString construction, added null checks on dialog UI controls in options(), and fixed critical logic flaw in gfile() where canceling an import dialog still executed the converter by checking dialog.exec() != QDialog::Accepted; in tests/qgmodel.cpp, tests/qgview.cpp, and tests/qsketch.cpp, guarded path_hashes against empty underflow and validated argc/argv with clean help handling in qgmodel, validated argc/argv with clean help handling and corrected argv[1] model path in qgview, and in qsketch validated argc/argv, added clean db_close on error exit paths, guarded nteeth <= 0 in sketch_create_gear to prevent division by zero (CWE-369), verified dp and dbip in QSketchEditWindow constructor, and guarded vertex/segment arrays and view in table population and screenshot methods. |
|
||||
| `SEC-0319` | **Sev 2** | Stack Out-of-Bounds Read, Memory Leaks, Resource Leaks, Uninitialized Memory, Path Detection Bugs, and NULL Pointer Dereferences | `libtclcad & include/tclcad (Batch 77: 15 files)` | `FIXED` | In BRL-CAD libtclcad Batch 77 (include/tclcad.h, include/tclcad/defines.h, include/tclcad/draw.h, include/tclcad/misc.h, include/tclcad/setup.h, tclcad_private.h, auto_path.c, cmdhist.c, command_io.cpp, eval.c, global.c, init.c, tests/check_itcl.cpp, tests/check_multi_interp.cpp, tests/check_tclcad_cmds.cpp, 3,267 lines): in include/tclcad/draw.h, corrected header guard comment from TCLCAD_MISC_H to TCLCAD_DRAW_H; in auto_path.c, fixed critical path detection bugs where ITCL_LIBRARY and ITK_LIBRARY overrides appended filename (itcl.tcl/itk.tcl) and inserted file path instead of directory into auto_path, breaking subsequent file existence checks, fixed itk_set flag never being set to 1, eliminated capturing Tcl error message into paths when tcl_library is unset by replacing unchecked Tcl_Eval with Tcl_GetVar, and added _insert_unique_path helper to deduplicate path entries; in cmdhist.c, fixed severe memory leak of str on all exit paths of tclcad_cmdhist_history (CWE-401), closed fp before error returns to prevent file descriptor leaks, guarded against NULL argv and argv[0], guarded chop and argv[2] in tclcad_cmdhist_add, guarded chop, cho_curr, and BU_LIST boundaries in tclcad_cmdhist_prev/curr/next, guarded chop->cho_curr in cho_cmd before dereferencing, replaced redundant nested BU_LIST_NEXT calls with standard while (BU_LIST_WHILE(...)) dequeue loop in cho_deleteProc, and guarded objects and interp in cho_open/cho_open_tcl; in command_io.cpp, initialized interp to NULL and io_mode to 0 in tclcad_create_io_data eliminating uninitialized struct members (CWE-457), and guarded p->p in tclcad_delete_io_handler to prevent NULL pointer dereference in bu_process_fileno (CWE-476); in eval.c, validated interp and command, guarded args against NULL, and ensured individual argument strings are non-null in tclcad_eval and tclcad_eval_noresult; in global.c, guarded clientData against NULL in tclcad_interp_objects_delete, guarded interp and key in tclcad_interp_objects, and guarded state in tclcad_current_top; in init.c, guarded clientData, interp, and cmds in tclcad_init_state_delete, tclcad_init_state, and tclcad_register_cmds, guarded ctp and ct_func in wrapper_func, guarded filename in tclcad_source_file, verified non-null state in tclcad_init, and fixed critical out-of-bounds stack read (CWE-125) in tclcad_set_argv where !argv caused cast of a single-char stack variable to (const char **) passed into Tcl_Merge, handling empty/non-positive argc cleanly without invalid memory access; in tests/check_itcl.cpp, tests/check_multi_interp.cpp, and tests/check_tclcad_cmds.cpp, validated argv and argv[0] before bu_setprogname/Tcl_FindExecutable and added standard -h/-?/--help usage output with clean exit 0. |
|
||||
| `SEC-0320` | **Sev 2** | Memory Leaks, Stack Out-of-Bounds Reads, Uninitialized Memory, Missing Include Guards, and NULL Pointer Dereferences | `src/libtclcad/view (Batch 78: 10 files)` | `FIXED` | In BRL-CAD libtclcad Batch 78 (view.h, arrows.c, autoview.c, axes.c, draw.c, faceplate.c, labels.c, lines.c, refresh.c, util.c, 2,912 lines): in view.h, added include guards, C++ extern C wrappers, and extern specifier on to_data_lines; in util.c, guarded gdvp, gdvp->dmp, current_top, and current_top->to_interp in to_is_viewable (CWE-476), initialized result_int to 0 (CWE-457), and prevented Tcl_Obj reference count memory leak on evaluation error by restoring and decrementing saved_result before early return (CWE-401); in autoview.c, fixed out-of-bounds argv[1] read in to_autoview by validating argc < 2 || argc > 3 (CWE-125), guarded tvd, tvd->gedp, current_top, and interp in to_autoview_view, and guarded top, top->to_gedp, and views in to_autoview_all_views; in arrows.c, fixed severe memory leak in points parsing where odd point count returned BRLCAD_ERROR without calling Tcl_Free((char *)av) (CWE-401), guarded current_top->to_gedp->u_data before disabling refresh_on, guarded gedp, gdvp, argv, and interp across go_data_arrows, to_data_arrows, and to_data_arrows_func, and added negative bounds validation on line_width, tip_length, and tip_width; in axes.c, guarded to_axes against argc < 3, NULL gedp, gdvp, gasp, and argv[2], validated non-negative values for axes_size, line_width, tick_interval, tick_length, tick_major_length, and ticks_per_major, guarded current_top, gdvp, and interp across go_data_axes and to_data_axes, and guarded gdvp->gv_s in to_model_axes, go_view_axes, and to_view_axes preventing NULL pointer crashes on uninitialized views (CWE-476); in draw.c, guarded hash table, udata, s_fpath, and dbip in key_matches_paths, guarded tvd->gedp, gedp->u_data, gedp->dbip, and sp->s_os in go_draw_solid, guarded gedp, ged_dl, and sp->s_os in go_draw_dlist, checked gdvp->dmp in go_draw, and in to_edit_redraw guarded dbip, ged_dl, verified !BU_LIST_IS_HEAD before dereferencing sp->s_os, and ensured last_gdlp is not head before dequeue and insert; in faceplate.c, guarded gedp, gdvp, and gdvp->gv_s in to_faceplate, and added RGB color range validation [0, 255] across center_dot, prim_labels, view_params, and view_scale; in labels.c, implemented _free_data_labels helper to safely free all allocated label strings and point buffers on Tcl_SplitList parsing failure, eliminating memory leaks on malformed input lists (CWE-401), guarded current_top, gedp, gdvp, and interp in go_data_labels, to_data_labels, and to_data_labels_func, validated non-negative label size, and in to_prim_label guarded current_top, gedp, and argv, prevented negative list size corruption on argc == 0, and safely reset list when argc == 1; in lines.c, guarded current_top, gedp, gdvp, and argv across go_data_lines and to_data_lines; in refresh.c, guarded gedp, gdvp, dbip, gdvp->gv_s, and current_top in go_refresh_draw, eliminated duplicate dm_draw_viewobjs call, guarded gdvp->u_data and dmp in go_refresh, guarded gdvp, top, and views in to_refresh_view and to_refresh_all_views, guarded gedp and current_top in to_refresh, to_refresh_all, and to_refresh_on, and added NULL checks in to_handle_refresh and to_refresh_handler. |
|
||||
| `SEC-0321` | **Sev 2** | Type Confusion, Double Free, Premature Object Deallocation, Memory Leaks, Heap Buffer Underflow, Division by Zero, and NULL Pointer Dereferences | `src/libtclcad (Batch 79: bu.c, fbserv.c, rt.c, tkImgFmtPIX.c, wrapper.c)` | `FIXED` | In BRL-CAD libtclcad Batch 79 (bu.c, fbserv.c, rt.c, tkImgFmtPIX.c, wrapper.c, 2,388 lines): in tkImgFmtPIX.c, fixed critical type confusion vulnerability in FileWritePIX where Tcl_Obj * format was passed directly into Tcl_AppendResult (which expects const char * strings), causing illegal pointer dereferences and application crashes (CWE-843), guarded format against NULL in FileReadPIX to prevent NULL pointer dereference in Tcl_GetStringFromObj (CWE-476), checked widthPtr and heightPtr before writing in FileMatchPIX, validated image dimensions and pixelSize in FileWritePIX, added integer overflow protection on fileWidth * pixelSize pitch calculation, bounded srcX and srcY, and matched bu_malloc/bu_free allocation labels; in rt.c, eliminated critical double-free / premature object deallocation bugs in tcl_obj_to_int_array and tcl_obj_to_fastf_array where Tcl_DecrRefCount was erroneously called on list elements returned by Tcl_ListObjGetElements (corrupting Tcl object refcounts and causing use-after-free and crash when lists are accessed or freed, CWE-416/CWE-415), fixed severe memory leaks in tcl_list_to_int_array and tcl_list_to_fastf_array by properly incrementing and decrementing the temporary Tcl_Obj wrapper (CWE-401), eliminated division by zero in tclcad_rt_parse_ray by verifying direction vector magnitude with ZERO() macro before unitizing (CWE-369), guarded against array out-of-bounds reads on xyz in tclcad_rt_pr_cutter, replaced undefined variable rayp with NULL in RT_HIT_NORMAL, replaced sprintf/sscanf/atoi with snprintf/bu_sscanf across all command wrappers, and added comprehensive NULL checks on clientData, interp, and argv; in wrapper.c, fixed heap buffer underflow (CWE-125) in to_more_args_func where trimming an empty first element decremented ac_more to 0, causing avmp[ac_more-1] to access avmp[-1], eliminated memory leaks in to_view_func_common and to_dm_func by allocating av only after argument validation, help checks, and view lookup, guarded gdvp->gv_s and gdvp->dmp before accessing view state and setting perspective, guarded tgd and current_top->to_interp, and replaced bu_vls_addr with bu_vls_cstr; in fbserv.c, guarded clientData, fbslp, fbsp, and string pointers in comm_error and new_client_handler, added index bounds checks (0 <= i/sub < MAX_CLIENTS) in open/close client handlers and Windows IPC handlers, validated port range [0, 65535], and replaced unsafe sprintf with snprintf; in bu.c, guarded ctp and ct_func in lwrapper_func, guarded interp and argv in tcl_bu_get_value_by_keyword, prevented string truncation underflow on short lists, replaced raw sscanf with bu_sscanf in color converters, guarded dirkey in _tclcad_bu_dir_print, checked conv_factor with ZERO() macro in tcl_bu_units_conversion, and replaced all bu_vls_addr calls with bu_vls_cstr. |
|
||||
| `SEC-0322` | **Sev 2** | Out-of-Bounds Reads, Memory Leaks, Parameter Swaps, Division by Zero, Integer Overflow / Dimension Guards, and NULL Pointer Dereferences | `src/libtclcad (Batch 80: bn.c, fb.c)` | `FIXED` | In BRL-CAD libtclcad Batch 80 (bn.c, fb.c, 2,535 lines): in fb.c, fixed critical out-of-bounds argument vector read in fbo_clear_tcl where argc == 3 erroneously accessed argv[6] instead of argv[2], causing invalid memory reads and segmentation crashes (CWE-125); added integer overflow protection and dimension clamping (<= 32768) in fbo_cell_tcl and fbo_rect_tcl preventing excessive memory allocation and heap buffer overflow (CWE-190/CWE-789); validated rectangle bounds against framebuffer dimensions (xmin + width <= fb_w and ymin + height <= fb_h) in fbo_cell_tcl and fbo_rect_tcl preventing memory corruption outside framebuffer bounds (CWE-125/CWE-787); validated port range (<= 65535) in fbo_listen_tcl and to_listen; corrected return code mapping in fbo_cmd from raw BRLCAD_ERROR to TCL_ERROR; added comprehensive NULL guards on gdvp, tvd, fbop, fbp, interp, gedp, and argv across fbo_coords_ok, fbo_deleteProc, fbo_close_tcl, fbo_clear_tcl, fbo_cursor_tcl, fbo_getcursor_tcl, fbo_refresh_tcl, fbo_listen_tcl, fbo_pixel_tcl, fbo_cell_tcl, fbo_flush_tcl, fbo_getheight_tcl, fbo_getwidth_tcl, fbo_getsize_tcl, fbo_rect_tcl, fbo_configure_tcl, to_fbs_callback, to_close_fbs, to_open_fbs, to_set_fb_mode, and to_listen; replaced unsafe sscanf with bu_sscanf and bu_vls_addr with bu_vls_cstr; in bn.c, fixed swapped parameter bug in tclcad_bn_eigen2x2 where matrix element b was parsed into c and c into b; prevented division by zero in tclcad_bn_mat_lookat by verifying hypot_xy with ZERO() macro before passing to bn_mat_lookat (CWE-369); corrected broken logic in bn_cmd_noise_slice which misread argv indices, discarded loop computations, and fell through to invalid noise types, replacing it with proper index reading, dimension validation (<= 4096), and returning the formatted noise list; fixed memory leak in tclcad_bn_mat_arb_rot on double conversion failure by routing to error label (CWE-401); added missing error messages on bn_decode_vect failures in vector functions; replaced unsafe atof with Tcl_GetDouble in bn_cmd_noise_perlin and bn_cmd_noise; replaced sscanf with bu_sscanf; guarded snprintf buffer sizes; and added comprehensive NULL checks on interp, argv, and clientData across all 35 math command wrappers. |
|
||||
| `SEC-0323` | **Sev 2** | Use-After-Free, Memory Leaks, Buffer Underflow / Out-of-Bounds Reads, Wrong Argument Indexing, Port Range Validation, and NULL Pointer Dereferences | `src/libtclcad (Batch 81: polygons.c, dm.c)` | `FIXED` | In BRL-CAD libtclcad Batch 81 (polygons.c and dm.c, 4,781 lines): in dm.c, fixed critical use-after-free vulnerability in fb_cmd_common_file_size where dynamic string zerr was passed to Tcl_SetResult with TCL_STATIC and immediately freed with bu_free, leaving Tcl pointing to freed heap memory (CWE-416); fixed critical out-of-bounds argument vector read in dmo_logfile_tcl where argc == 3 erroneously accessed argv[3] instead of argv[2] (CWE-125); guarded out-of-bounds vector reads in error and help handlers across 28 display manager command callbacks; guarded vector index decodes in dmo_parseAxesArgs, dmo_parseDataAxesArgs, and dmo_parseModelAxesArgs; added port range validation (<= 65535) in dmo_listen_tcl; mapped return codes in dmo_cmd from BRLCAD_OK to TCL_OK/TCL_ERROR; replaced sprintf with snprintf; replaced raw atof/atoi with sscanf/bu_sscanf; replaced all bu_vls_addr calls with bu_vls_cstr; added comprehensive NULL checks on dmop, interp, dmo_dmp, and dmo_dmp->i across all 38 display manager routines; in polygons.c, implemented _free_partial_poly and _free_partial_polygon_state cleanup helpers to eliminate severe memory leaks on parse/split failures (CWE-401); freed contour_av on replace_poly success; freed allocated bg_polygon in import; fixed off-by-one out-of-bounds indexing in target_poly (CWE-125); prevented size_t underflow in clip when num_polygons == 0 and state corruption when num_polygons < 2; checked bg_clip_polygon result for NULL; guarded gdvp->dmp, current_top->to_gedp->u_data, current_top->to_interp, and gv_s across all polygon commands; and replaced bu_vls_addr with bu_vls_cstr. |
|
||||
| `SEC-0324` | **Sev 2** | Memory Leaks, Uncomputed Model Coordinates Logic Bug, Buffer Overflow / Missing NULL-terminator, Division by Zero, Uninitialized Pointers, and NULL Pointer Dereferences | `src/libtclcad (Batch 82: mouse.c)` | `FIXED` | In BRL-CAD libtclcad Batch 82 (mouse.c, 3,594 lines): fixed critical logic bug in to_mouse_otranslate where model point was declared with VINIT_ZERO and never transformed by the inverse rotation matrix before printing into tran_x_vls, tran_y_vls, tran_z_vls and passing to ged_exec_otranslate (which caused all mouse translations to pass 0, 0, 0); eliminated persistent memory leaks of brep_name and bindings bu_vls on failure paths in to_mouse_brep_selection_append and to_mouse_brep_selection_translate (CWE-401); eliminated memory leaks of joint_name and bindings bu_vls on failure paths in to_mouse_joint_select and to_mouse_joint_selection_translate (CWE-401); fixed buffer allocation and missing NULL terminator in to_mouse_move_bot_pnts where allocating ac elements resulted in av[ac-1] being overwritten by the loop and leaving no NULL termination (CWE-125/CWE-787), allocating ac + 1 and properly terminating; fixed uninitialized gedp->ged_gvp pointer dereference and wrong view rotation matrix inversion in to_mouse_brep_selection_append, to_mouse_joint_select, to_mouse_poly_circ_func, to_mouse_poly_ell_func, to_mouse_poly_rect_func, and to_data_scale (CWE-476); prevented division by zero across to_mouse_constrain_trans, to_mouse_move_arb_edge, to_mouse_move_arb_face, to_mouse_move_bot_pnt, to_mouse_move_bot_pnts, to_mouse_move_pnt_common, to_mouse_oscale, to_mouse_otranslate, TO_COMMON_MOUSE_SCALE, to_mouse_pscale, to_mouse_ptranslate, and to_mouse_trans by clamping width <= 0 to 1 before calculating inv_width (CWE-369); corrected error messages in to_mouse_constrain_rot and to_mouse_constrain_trans on invalid axis; guarded wdbp returned from wdb_dbopen in to_mouse_move_bot_pnt; guarded gdvp->dmp in to_mouse_rect before calling dm_get_height; guarded current_top, current_top->to_interp, current_top->to_gedp, and u_data across all callback executions and polygon functions; and modernized all (~38) bu_vls_addr calls to bu_vls_cstr. |
|
||||
| `SEC-0325` | **Sev 2** | Inverted Logic / Crasher, Resource Leaks, Buffer Overflow / Unchecked sprintf, Division by Zero, Type Confusion, Memory Leaks, and NULL Pointer Dereferences | `src/libtclcad (Batch 83: commands.c)` | `FIXED` | In BRL-CAD libtclcad Batch 83 (commands.c, 6,748 lines): completing all 31 files of src/libtclcad (100% complete): fixed critical inverted logic bug in to_pix where dm_make_current returning BRLCAD_OK (0) was treated as failure via !make_ret and aborted; fixed persistent resource leaks of PNG write structures in to_png on error and exit paths by properly invoking png_destroy_write_struct; fixed memory leak of callback_cmd bu_vls in to_rt_end_callback_internal; fixed severe buffer overflow vulnerability and memory leak in to_dplot where fixed stack buffer av[256] lacked bounds check on split list length, had an off-by-one indexing error on NULL terminator, and leaked memory on Tcl_Eval failure; fixed type confusion bug in free_path_edit_params by using correct struct dm_path_edit_params; fixed division-by-zero vulnerabilities in to_bounds, to_data_move_func, to_data_pick_func, to_view2screen, and to_vslew by validating clip boundaries and clamping non-positive width/height before computing scale factors and aspect ratios; prevented negative array indexing in to_make, to_mirror, to_bot_edge_split, and to_bot_face_split by enforcing argument count bounds; preserved ged_exec command output in to_bot_edge_split and to_bot_face_split before invoking redraw; replaced unchecked sprintf with snprintf in to_vmake; added NULL pointer guards across all commands validating gedp, gdvp, dmp, dbip, current_top, to_gedp, and to_interp; and modernized all (~60) bu_vls_addr calls to bu_vls_cstr. |
|
||||
| `SEC-0326` | **Sev 2** | Division by Zero, Premature Dereference / NULL Pointer Crashes, Integer Overflow on Dimensions & Buffers, Out-of-Bounds Reads, and Unhandled Floating-Point NaNs | `src/libicv (Batch 84: 11 files)` | `FIXED` | In BRL-CAD libicv Batch 84 (asciiart.cpp, bw.c, color_space.c, crop.c, dpix.c, encoding.c, icv_private.h, operations.c, pix.c, ppm.c, stat.c, 2,400 lines): in stat.c, fixed critical premature NULL dereference in icv_hist where img->width and img->data were accessed prior to the ICV_IMAGE_VAL_PTR(img) check (CWE-476); eliminated multiple division-by-zero vulnerabilities in icv_mean, icv_var, and icv_skew when image width/height are zero (CWE-369); guarded against NULL bins, zero n_bins, and zero channels across all statistical routines; prevented out-of-bounds reads and NaN propagation in icv_max, icv_min, and icv_sum; in operations.c, fixed premature NULL dereference in icv_add_val by checking ICV_IMAGE_VAL_INT before accessing img->data; prevented division-by-zero crashes in icv_divide_val and icv_divide; fixed multi-channel desynchronization / out-of-bounds corruption in icv_saturate by advancing by img->channels instead of hardcoded 3; guarded img dimensions and scale factors against division by zero in icv_fit; in crop.c, fixed division-by-zero crash in icv_crop when img->channels is zero; added integer overflow checks on row byte calculations in icv_crop_rect and icv_crop (CWE-190); in color_space.c, guarded against out-of-bounds reads in icv_rgb2gray when channels < 3 (CWE-125); added integer overflow protection on dimensions and buffer allocations in icv_gray2rgb and icv_rgb2gray; in encoding.c, guarded against NULL data and integer overflows in icv_uchar2double and icv_data2uchar, and prevented division-by-zero and domain errors on negative or zero gamma; in dpix.c, safely handled NaNs/Infs during normalization to prevent divide-by-zero and infinite loops, replaced raw POSIX read/write with stdio fread/fwrite to eliminate short-read and buffering bugs, and added integer overflow validation on sample counts; in pix.c and bw.c, guarded against NULL data conversion pointers, checked dimensions against size_t overflow, eliminated truncation from int casts, and checked realloc limits on stream reads; in ppm.c, clamped RGB float values before lrint to avoid undefined integer conversions, replaced sprintf with snprintf for PPM headers (CWE-120), guarded against numeric overflow in parse_ppm_int, and validated buffer limits in ppm_read_mem; in asciiart.cpp, validated image pointer, data, channels, dimensions, and brightness multiplier; and in icv_private.h, properly positioned include guards. |
|
||||
| `SEC-0327` | **Sev 2** | Division by Zero, Resource & Memory Leaks, NULL Pointer Dereference, Setjmp/Longjmp Undefined Behavior, Integer Overflow on Dimensions & Buffers, and Out-of-Bounds Access | `src/libicv (Batch 85: 6 files)` | `FIXED` | In BRL-CAD libicv Batch 85 (fileformat.c, filter.c, jpeg.c, pixcii.hpp, rot.c, size.c, 2,925 lines): in fileformat.c, fixed memory leak of ofilename on validation failure and fopen error paths in icv_write (CWE-401); prevented closing stdin on unsupported format; guarded against NULL bif->data, 0 width/height/channels, and integer overflows in icv_write, icv_write_mem, icv_writeline, and icv_writepixel; added NULL data check in icv_zero and invalidated magic in icv_destroy to prevent use-after-free; in jpeg.c, declared setjmp-lived pointers volatile to eliminate undefined behavior across longjmp; checked icv_data2uchar return values against NULL before scanline processing; eliminated memory leak of libjpeg buffer mem_buf on write failure; guarded dimensions against 0/invalid sizes and checked double-converted buffer allocations in jpeg_read and jpeg_read_mem; in rot.c, guarded argc/argv before calling bu_setprogname; validated pixel size, square size, and width/height options with strtol; set stdout to binary mode for piping binary image streams on Windows; added integer overflow checks on scanline bytes and buffer allocations in arbrot and icv_rot; hardened arbrot coordinates to size_t; supported negative rotation angles via !ZERO(angle); in size.c, guarded icv_image_size against NULL widthp/heightp and zero unit conversions; guarded shrink_image and under_sample against NULL image data, 0 channels, and integer overflows on realloc; removed truncating int casts on dimensions; prevented division by zero in resize_output_valid; in filter.c, validated kernel and offset pointers in get_kernel and get_kernel3; guarded icv_filter, icv_filter3, and icv_fade against NULL data, 0 channels/dimensions, NaN fraction multipliers, and integer overflows; and in pixcii.hpp, guarded against empty ascii character maps, handled NaN brightness boosts, converted signed int pixel indexing to size_t with overflow guards, and clamped double pixel color values safely. |
|
||||
| `SEC-0328` | **Sev 2** | Division by Zero, Setjmp/Longjmp Undefined Behavior, Resource & Memory Leaks, Buffer Bounds & Out-of-Bounds Reads, Integer Overflow on Dimensions & Buffers, and Undefined Float-to-Int Conversions | `src/libicv (Batch 86: 5 files)` | `FIXED` | In BRL-CAD libicv Batch 86 (PImgHash.cpp, PImgHash.h, diff.cpp, diff_approx.cpp, png.cpp, 2,233 lines): in png.cpp, validated bif pointer, bif->data, dimensions, and channels in png_write and png_write_mem; declared setjmp-spanning local pointers volatile to prevent undefined behavior across longjmp (CWE-398); eliminated memory leak of converted pixel buffer data on write errors and used icv_destroy in setjmp handlers to prevent leaks of bif->render_info (CWE-401); prevented integer overflow in user_read_data bounds calculation (CWE-190); validated rowbytes against width * 3 in png_read to prevent heap out-of-bounds writes (CWE-122); validated rowbytes and buffer allocations in png_read and png_read_mem; in diff.cpp, guarded write_nirt_shots_for_ri against division by zero on aspect, width, height, and viewsize (CWE-369); guarded icv_diff_nirt_shots against NULL data, mismatched channel counts (< 3), and buffer allocation overflow; prevented heap out-of-bounds reads in icv_diff by indexing per-image channel counts instead of hardcoded 3 and guarded against signed integer overflow on off_by_many; validated 3-channel input, integer overflow on dimensions, and clean buffer freeing in icv_diffimg; in diff_approx.cpp, made load_icv static, guarded against NULL data, unsigned underflow when rows == 0, and integer overflow; validated image pointers and dimensions in pdiff_dct; guarded ssim_calc against NULL data, zero dimensions/channels, and sanitized non-finite NaN/Inf pixel values; in PImgHash.cpp and PImgHash.h, clamped float pixel values to [0.0, 1.0] with NaN check in convert_pix to prevent undefined float-to-int cast conversions (CWE-190/CWE-681); guarded DCTHasher::apply against zero dimensions; prevented out-of-bounds vector writes in tile_size when b == 0 or j >= b; guarded Preprocess::start and Preprocess::stop against division by zero and out-of-bounds histogram access; prevented NULL pointer dereferences and integer overflows in Image class; and guarded resize_row, resize, and add_row against division by zero on tile size. |
|
||||
| `SEC-0329` | **Sev 2** | Integer Overflow on Dimensions & Buffers, Unsigned Underflow, Heap Buffer Overflows & Overreads, CPU Exhaustion DoS, Undefined Float Conversions, and NULL Pointer Dereferences | `src/libicv (Batch 87: anim.cpp, apngmini.hpp, rle.cpp, rle.hpp)` | `FIXED` | In BRL-CAD libicv Batch 87 (anim.cpp, apngmini.hpp, rle.cpp, rle.hpp, 3,778 lines): in anim.cpp, validated bif pointer, bif->data, dimensions, and channels in icv_to_apng preventing heap out-of-bounds reads on unexpected channel layouts (CWE-125); clamped float pixel values in float_to_u8 with std::isfinite check to prevent undefined float-to-uint8 cast conversions (CWE-190/CWE-681); guarded read_mjpeg_avi against chunk size underflow and unbounded memory allocation (CWE-191/CWE-400); guarded write_mjpeg_avi against 32-bit integer arithmetic overflows on data rate, frame bytes, and index blocks; validated image pointers and non-empty dimensions across icv_anim_write, icv_anim_add_frame, icv_anim_insert_frame, icv_anim_replace_frame, and icv_anim_get_frame; in apngmini.hpp, enforced maximum pixel limits, non-zero dimensions, and rowbytes buffer bounds in LibpngBackend decode/encode routines; guarded write_chunk against size_t overflow; ensured valid pixel bounds and buffer sizes before cropping and over-compositing; eliminated unsigned underflow and heap buffer corruption during background disposal in Animation::compose when frame.x_offset >= canvas_width (CWE-191/CWE-122); guarded chunk peeking against integer overflow and enforced minimum 4-byte length on fdAT chunks; capped maximum file read size to 512MB in read_file; in rle.cpp, sanitized double-to-uint8 conversions in dbl_to_u8 against non-finite NaN/Inf values; validated image data and dimensions in rle_write and rle_write_mem; guarded memory stream buffer allocation; in rle.hpp, implemented a per-row opcode counter in Decoder::read to prevent CPU exhaustion DoS attacks (CWE-400); clamped scanline and pixel skips to image boundaries to prevent unsigned integer wrap-around and out-of-bounds buffer writes (CWE-122/CWE-190); validated image buffer capacity before colormap transformations; ensured non-null buffer and positive dimensions in write_rgb; and prevented integer overflow in MemReadStream::tell. |
|
||||
| `SEC-0330` | **Sev 2** | Memory Management Mismatch, Unchecked Vector & Buffer Bounds, Temporary File Leaks, Unbounded Allocation & Integer Overflows, Division by Zero, and NULL Pointer Dereferences | `src/libicv (Batch 88: tests/apngmini.cpp, tests/demo.c, tests/fileformat.c, tests/icv_diff_test.c, tests/icv_png_json_test.cpp, tests/pimghash.cpp, tests/rle.cpp, tests/robustness.c)` | `FIXED` | In BRL-CAD libicv Batch 88 (tests/apngmini.cpp, tests/demo.c, tests/fileformat.c, tests/icv_diff_test.c, tests/icv_png_json_test.cpp, tests/pimghash.cpp, tests/rle.cpp, tests/robustness.c, 4,882 lines, completing src/libicv to 100%): in rle.cpp, resolved allocator mismatch (CWE-762) by changing create_test_image from libc calloc to bu_calloc to match bu_free in free_test_image; guarded against arithmetic overflow in image data size calculation; added null data checks in pixels_match; ensured temporary test files in rle_roundtrip, test_write_invalid_channels, and test_write_oversized_dimensions are deleted on error and completion; and exercised null file stream handling in test_invalid_file; in apngmini.cpp, validated frame dimensions in make_frame to prevent integer overflow and excessive allocation; verified vector bounds before indexing composed frame pixels to prevent out-of-bounds reads (CWE-125); and ensured roundtrip temporary files are deleted via RAII cleanup; in demo.c, validated image creation and buffer allocations in demo_rgb and prevented division by zero when dimensions sum to zero; guarded against dimension overflow and null pointers in clone_image; added null checks across demo_memory_io, demo_file_io, demo_crop_filter_ascii, and demo_diffs; and ensured temporary animation test files are cleaned up unconditionally; in fileformat.c, validated image data allocation in make_pixel and guarded path parameter in write_auto_pix; in icv_diff_test.c, validated dimensions and arithmetic overflow in make_solid; added null data checks in test_icv_diff_counts and test_icv_diffimg_colors; and validated render_info pointers before dereferencing in test_png_metadata_roundtrip, test_diff_render_info, and test_nirt_shots; in icv_png_json_test.cpp, validated dimensions and data pointers in make_solid; capped maximum file read size to 100MB in png_read_text_chunk; guarded chunk parsing against 32-bit integer overflow; and verified render_info allocations before dereferencing; in pimghash.cpp, sanitized floating-point comparisons with std::isfinite in nearly_equal; and checked vector size before indexing hash bytes in test_hashing; in robustness.c, validated dimensions and memory allocations across all make_* helper functions; prevented division by zero in make_unit_rgb; checked statistics pointers (minv, maxv, sumv, meanv, bins, mode, median, var, skew) for null before access in test_crop_filters_and_stats; and guarded metadata and frame allocations in test_ascii_render_info_and_diff and test_animation_frame_management; and across all test harnesses, safely validated argc > 0 && argv && argv[0] before calling bu_setprogname. |
|
||||
| `SEC-0331` | **Sev 2** | Buffer Overlapping Undefined Behavior, Stack & Heap Buffer Truncation / Overflow, Division by Zero, Unsigned Integer Underflow, Memory Leaks, Dangling / Unchecked Pointers, and NULL Pointer Dereferences | `src/libnmg (Batch 89: bool.c, ck.c)` | `FIXED` | In BRL-CAD libnmg Batch 89 (bool.c, ck.c, 2,801 lines): in ck.c, resolved critical undefined behavior (UB) and buffer corruption across all topological consistency check routines (nmg_ck_e, nmg_ck_vu, nmg_ck_eu, nmg_ck_lg, nmg_ck_l, nmg_ck_lu, nmg_ck_fg, nmg_ck_f, nmg_ck_fu) by replacing unsafe fixed-length heap allocations and overlapping snprintf calls (where the destination buffer was also passed as the %s source argument) with dynamically sized struct bu_vls formatting; fixed CWE-369 division-by-zero vulnerability in nmg_ck_eg_verts by guarding edge direction magnitude against zero before calling VUNITIZE; eliminated NULL pointer dereferences when logging or checking without parent strings by guarding string pointers; in nmg_ck_lueu, fixed backward/forward edge logging mismatch bug, corrected routine name typo in logs, and guarded circular list navigation against empty list heads; hardened all 17 nmg_v* validator routines (nmg_vvg, nmg_vvertex, nmg_vvua, nmg_vvu, nmg_veg, nmg_vedge, nmg_veu, nmg_vlg, nmg_vloop, nmg_vlu, nmg_vfg, nmg_vface, nmg_vfu, nmg_vsshell, nmg_vshell, nmg_vregion, nmg_vmodel) with comprehensive NULL checks, magic identification guards, and coordinate validation; in nmg_eu_2s_orient_bad, guarded radial and mate pointers during circular traversal; in nmg_ck_closed_surf and nmg_ck_closed_region, checked pointer validity before recursive verification; in nmg_ck_v_in_2fus and nmg_ck_vs_in_region, ensured vertex geometry and model pointers are valid and sanitized visited array allocation against negative or zero maxindex; in bool.c, guarded nmg_plot_open_edges against NULL magic, checked vertex coordinate pointers, and ensured plot_file_name bu_vls is unconditionally freed at exit; validated model and shell pointers in nmg_has_dangling_faces; eliminated unsigned integer underflow vulnerability in nmg_kill_anti_loops during loop deletion; safely bounded buffer formatting in nmg_show_each_loop; guarded edgeuse mate pointers in nmg_classify_shared_edges_verts; removed obsolete #if 0 dead code block; ensured bounding boxes exist before disjoint tests in nmg_bool; and guarded model maxindex against non-positive sizes before calloc/memcpy in boolean evaluation. |
|
||||
| `SEC-0332` | **Sev 2** | Off-by-One Heap Buffer Overflows, Union Type Confusion, Division by Zero, Broken Radial Circular Loops, Dead Code Blocks, and NULL Pointer Dereferences | `src/libnmg (Batch 90: class.c, copy.c)` | `FIXED` | In BRL-CAD libnmg Batch 90 (class.c, copy.c, 3,392 lines): in copy.c, resolved critical off-by-one heap buffer overflow in nmg_clone_model by allocating maxelem = original->maxindex > 0 ? (size_t)original->maxindex + 1 : 1 instead of original->maxindex, preventing out-of-bounds writes and corruptions when elements with index == maxindex are cloned; introduced safe index-checked structArray accessor helpers get_struct and set_struct validating index >= 0 && (size_t)index < maxelem; fixed union type confusion in nmg_construct_face where case NMG_FACE_G_SNURB_MAGIC accessed original->g.plane_p->index instead of original->g.snurb_p->index; hardened all 20 structure constructors (nmg_construct_region_a, nmg_construct_region, nmg_construct_face_g_plane, nmg_construct_face_g_snurb, nmg_construct_face, nmg_construct_vertex_g, nmg_construct_vertex, nmg_construct_vertexuse_a_plane, nmg_construct_vertexuse_a_cnurb, nmg_construct_vertexuse, nmg_construct_edge, nmg_construct_edge_g_lseg, nmg_construct_edge_g_cnurb, nmg_construct_edgeuse, nmg_construct_loop_a, nmg_construct_loop, nmg_construct_loopuse, nmg_construct_faceuse, nmg_construct_shell_a, nmg_construct_shell) with input NULL checks, safe structArray index bounds validation, and non-null child insertion guards; validated knot vector sizes (u.k_size, v.k_size, k_size) and ctl_points array allocations before copying in SNURB and CNURB constructors; removed dead unused tolerance variable in nmg_clone_model; in class.c, fixed CWE-369 division-by-zero vulnerability in nmg_class_pnt_e by checking MAGSQ(ptvec) < SMALL_FASTF before calling VUNITIZE; eliminated off-by-one heap underallocations in nmg_class_pnt_e debug plot bits buffer, nmg_class_pnt_s faces_seen array, and class_lu_vs_s b buffer by allocating (size_t)maxindex + 1; replaced unsafe sprintf calls with snprintf across debug plot generators; deleted two large obsolete #if 0 dead code blocks (~200 lines: nmg_class_lu_fu and nmg_get_interior_pnt); guarded against NULL shell attributes (s->sa_p) before bounding box dereferences in nmg_class_pnt_s, class_eu_vs_s, and nmg_classify_s_vs_s by ensuring attributes via nmg_shell_a; hardened radial and mate pointer cycles against NULL dereference and infinite loops in class_eu_vs_s, class_shared_lu, and class_lu_vs_s; and prevented crashes and type confusion on empty or vertex loops in class_shared_lu and nmg_classify_s_vs_s by validating list emptiness, checking child magic, and ensuring vertex geometry pointers are non-null. |
|
||||
| `SEC-0333` | **Sev 2** | Heap Buffer Overflows / OOB Writes, Memory Leaks, Copy-Paste Edge Intersection Defects, Denial of Service / Aborts, and NULL Pointer Dereferences | `src/libnmg (Batch 91: eval.c, extrude.c)` | `FIXED` | In BRL-CAD libnmg Batch 91 (eval.c, extrude.c, 2,024 lines): in extrude.c, resolved critical Cat 1 heap buffer overflow / OOB write vulnerabilities (CWE-122 / CWE-787) in nmg_hollow_shell and nmg_extrude_shell by allocating maxelem = (m->maxindex > 0) ? (size_t)m->maxindex + 1 : 1 instead of m->maxindex, preventing memory corruption when elements with index == maxindex are processed by NMG_INDEX_TEST_AND_SET; fixed critical copy-paste bug in nmg_fix_overlapping_loops where edge splitting on intersection endpoints incorrectly referenced eu2 instead of eu1 on dist[0] == 1.0, and nmg_esplit was erroneously confined to the interior-only else branch, leaving crossing edges completely unsplit when touching existing vertex endpoints; fixed multiple persistent memory leaks: loop_tab allocations in nmg_fix_overlapping_loops when tables were empty, outfaces in nmg_extrude_face on early error returns, and the verts table in nmg_extrude_shell when vertex recalculation failed before out: (CWE-401); replaced fatal bu_bomb abort in nmg_extrude_face on parallel extrusion with graceful error return (-1) and moved angle calculation before nmg_dup_face to prevent orphaned/leaked duplicated geometry; added loop bounds and magic number validation in nmg_start_new_loop to guard against infinite loops and type confusion; hardened verts_in_nmg_loop, verts_in_nmg_face, nmg_translate_face, nmg_find_vertex_in_lu, nmg_break_crossed_loops, and nmg_extrude_cleanup with comprehensive NULL checks, empty loop guards, and coordinate validation; in eval.c, hardened nmg_eval_action with classification table bounds checking (bs_maxindex) to prevent negative array indexing or heap out-of-bounds reads (CWE-125); added NULL guards, parent magic verification, and planar face geometry checks in nmg_ck_lu_orientation to avoid illegal dereferences on non-faceuse parents or SNURB faces; hardened nmg_eval_shell against crashing on empty loops or malformed wire edgeuse parents in BACTION_KILL; replaced unsafe sprintf with snprintf in debug plot file naming; and replaced fatal bu_bomb on plot file write failure with a non-fatal bu_log warning. |
|
||||
| `SEC-0334` | **Sev 2** | Stack & Heap Uninitialized Memory / Sizeof Pointer, Persistent Memory Leaks, Division by Zero, Unsigned Underflow, Dead Code Elimination, and NULL Pointer Dereferences | `src/libnmg (Batch 92: fcut.c)` | `FIXED` | In BRL-CAD libnmg Batch 92 (fcut.c, 3,809 lines): in nmg_face_rs_init, resolved critical Cat 1 sizeof-pointer memory initialization defect (CWE-467) where memset((char *)rs, 0, sizeof(rs)) only zeroed 8 bytes (pointer size) leaving the remaining 90% of the nmg_ray_state structure filled with uninitialized stack memory; resolved multiple persistent memory leaks (CWE-401) in find_loop_to_cut and nmg_fcut_face where dynamically allocated struct loop_cuts objects in the cuts table were removed via bu_ptbl_rm or left in cuts when freeing the table without ever calling bu_free; fixed CWE-369 division-by-zero vulnerabilities across VUNITIZE calls on rs->left in nmg_face_rs_init, x_dir and y_dir in find_loop_to_cut, and x_dir and y_dir in nmg_eu_angle by guarding vector magnitude against zero before normalization; fixed CWE-191 unsigned integer underflow and infinite loop vulnerability in ptbl_vsort bubble sort loop bounds by using safe i + 1 < b->end comparison; eliminated type confusion crashes on lone vertex loops in find_best_vu by verifying parent magic (*vu->up.magic_p == NMG_EDGEUSE_MAGIC) before treating parents as edgeuses; eliminated out-of-bounds pointer reads and potential null dereferences in nmg_fcut_face traversal loops (prior_start, prior_end, next_end) by enforcing array bounds against rs->nvu; guarded ptbl_vsort against division by zero on dist_tol <= 0; added retry iteration limits and safe return paths in nmg_ck_vu_ptbl and nmg_face_cutjoin to prevent infinite loops; restored active exported implementations of nmg_sanitize_fu and nmg_wedge_class from dead code blocks; replaced fatal bu_bomb aborts across active routines with error logging and graceful failure returns; and eliminated ~2,500 lines of obsolete #if 0 dead code blocks from 1993/2017. |
|
||||
| `SEC-0335` | **Sev 2** | Persistent Memory Leaks, Division by Zero, Control Point Misalignment, Infinite Loops, Denial of Service / Aborts, and NULL Pointer Dereferences | `src/libnmg (Batch 93: fuse.c)` | `FIXED` | In BRL-CAD libnmg Batch 93 (fuse.c, 3,468 lines): resolved multiple persistent memory leaks (CWE-401) by freeing dynamic sort_idx_xyp allocation in nmg_edge_g_fuse which was previously never deallocated, freeing etab table on zero-count exit in nmg_edge_g_fuse, and freeing tmp table on empty-length exits in nmg_vertex_fuse and nmg_edge_fuse; fixed control points stride misalignment and buffer bounds defects in nmg_cnurb_is_linear (CWE-125 / CWE-129) where ctl_points was indexed by i instead of i * coords and compared using 3D VEQUAL instead of dimension-aware coords comparisons with EQUAL macro, as well as fixing the loop upper bound to cnrb->c_size - 1; fixed multiple CWE-369 division-by-zero vulnerabilities: guarded rise-over-run slopes (dx and dy) in nmg_edge_g_fuse across XY, XZ, and YZ planes, guarded srf->s_size[0] * srf->s_size[1] <= 0 and plane normal magnitude MAGSQ(pl) <= SMALL_FASTF in nmg_snurb_is_planar, and guarded rational weights (xyz1[coords-1] and uvw[coords-1]) in nmg_eval_linear_trim_curve and nmg_eval_trim_curve; fixed potential infinite loop hangs (CWE-835) in nmg_radial_implement_decisions and nmg_do_radial_join by adding pass progress tracking (progress++) to prevent infinite looping when skipped elements make no forward progress; eliminated 43 fatal bu_bomb aborts (CWE-400 / DoS) across topological fusing, crack classification, and radial edge joining (nmg_region_v_unique, nmg_vertex_fuse, nmg_snurb_is_planar, nmg_split_trim, nmg_cnurb_lseg_coincident, nmg_cnurb_is_on_crv, nmg_edge_fuse, nmg_ck_fu_verts, nmg_break_all_es_on_v, nmg_radial_verify_pointers, nmg_radial_verify_monotone, nmg_radial_build_list, nmg_is_crack_outie, nmg_find_radial_eu, nmg_radial_mark_cracks, nmg_radial_find_an_original, nmg_radial_mark_flips, nmg_radial_join_eu_NEW), replacing them with informative error/debug logging and graceful non-fatal fallback returns; and hardened against NULL pointer dereferences and out-of-bounds reads (CWE-476 / CWE-125) in nmg_edge_fuse, nmg_edge_g_fuse, nmg_break_all_es_on_v, nmg_break_e_on_v, and radial utilities with comprehensive parameter validation and geometry checks. |
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,158 +0,0 @@
|
||||
#!/usr/bin/env python3
|
||||
import os
|
||||
import sys
|
||||
import json
|
||||
import time
|
||||
import argparse
|
||||
|
||||
REPO_ROOT = os.path.abspath(os.path.join(os.path.dirname(__file__), ".."))
|
||||
AUDIT_DIR = os.path.join(REPO_ROOT, "audit")
|
||||
FILES_LEDGER = os.path.join(AUDIT_DIR, "files_ledger.json")
|
||||
ISSUES_LEDGER = os.path.join(AUDIT_DIR, "issues_ledger.json")
|
||||
|
||||
def load_files():
|
||||
if not os.path.exists(FILES_LEDGER):
|
||||
return {"files": []}
|
||||
with open(FILES_LEDGER, "r", encoding="utf-8") as f:
|
||||
return json.load(f)
|
||||
|
||||
def save_files(data):
|
||||
with open(FILES_LEDGER, "w", encoding="utf-8") as f:
|
||||
json.dump(data, f, indent=2)
|
||||
|
||||
def load_issues():
|
||||
if not os.path.exists(ISSUES_LEDGER):
|
||||
return {"issues": []}
|
||||
with open(ISSUES_LEDGER, "r", encoding="utf-8") as f:
|
||||
return json.load(f)
|
||||
|
||||
def save_issues(data):
|
||||
with open(ISSUES_LEDGER, "w", encoding="utf-8") as f:
|
||||
json.dump(data, f, indent=2)
|
||||
|
||||
def mark_reviewed(file_paths):
|
||||
fdata = load_files()
|
||||
path_map = {f["path"]: f for f in fdata.get("files", [])}
|
||||
ts = time.strftime("%Y-%m-%dT%H:%M:%SZ", time.gmtime())
|
||||
updated = 0
|
||||
for p in file_paths:
|
||||
norm_p = os.path.relpath(os.path.join(REPO_ROOT, p), REPO_ROOT)
|
||||
if norm_p in path_map:
|
||||
path_map[norm_p]["status"] = "REVIEWED"
|
||||
path_map[norm_p]["reviewed_at"] = ts
|
||||
updated += 1
|
||||
else:
|
||||
print(f"Warning: file not found in ledger: {norm_p}")
|
||||
save_files(fdata)
|
||||
print(f"Marked {updated} file(s) as REVIEWED.")
|
||||
|
||||
def log_issue(file_path, line_range, severity, category, description):
|
||||
fdata = load_files()
|
||||
idata = load_issues()
|
||||
issues = idata.get("issues", [])
|
||||
next_id_num = len(issues) + 1
|
||||
issue_id = f"SEC-{next_id_num:04d}"
|
||||
|
||||
norm_p = os.path.relpath(os.path.join(REPO_ROOT, file_path), REPO_ROOT)
|
||||
|
||||
new_issue = {
|
||||
"id": issue_id,
|
||||
"file": norm_p,
|
||||
"lines": line_range,
|
||||
"severity": int(severity),
|
||||
"category": category,
|
||||
"description": description,
|
||||
"verification_status": "PENDING",
|
||||
"verification_test": None,
|
||||
"test_result": None,
|
||||
"fix_status": "UNFIXED",
|
||||
"fix_description": None,
|
||||
"commit_hash": None,
|
||||
"commit_message": None,
|
||||
"created_at": time.strftime("%Y-%m-%dT%H:%M:%SZ", time.gmtime())
|
||||
}
|
||||
issues.append(new_issue)
|
||||
idata["issues"] = issues
|
||||
save_issues(idata)
|
||||
|
||||
# Link to file in files_ledger
|
||||
path_map = {f["path"]: f for f in fdata.get("files", [])}
|
||||
if norm_p in path_map:
|
||||
path_map[norm_p]["issues_count"] = path_map[norm_p].get("issues_count", 0) + 1
|
||||
if "issue_ids" not in path_map[norm_p]:
|
||||
path_map[norm_p]["issue_ids"] = []
|
||||
path_map[norm_p]["issue_ids"].append(issue_id)
|
||||
save_files(fdata)
|
||||
|
||||
print(f"Logged issue {issue_id}: [{category}] Severity {severity} in {norm_p}:{line_range}")
|
||||
return issue_id
|
||||
|
||||
def verify_issue(issue_id, status, test_desc, test_result):
|
||||
idata = load_issues()
|
||||
for issue in idata.get("issues", []):
|
||||
if issue["id"] == issue_id:
|
||||
issue["verification_status"] = status
|
||||
issue["verification_test"] = test_desc
|
||||
issue["test_result"] = test_result
|
||||
issue["verified_at"] = time.strftime("%Y-%m-%dT%H:%M:%SZ", time.gmtime())
|
||||
save_issues(idata)
|
||||
print(f"Updated {issue_id} verification status: {status}")
|
||||
return
|
||||
print(f"Error: Issue {issue_id} not found.")
|
||||
|
||||
def record_fix(issue_id, fix_desc, commit_msg, commit_hash=None):
|
||||
idata = load_issues()
|
||||
for issue in idata.get("issues", []):
|
||||
if issue["id"] == issue_id:
|
||||
issue["fix_status"] = "FIXED" if commit_hash else "PENDING_COMMIT"
|
||||
issue["fix_description"] = fix_desc
|
||||
issue["commit_message"] = commit_msg
|
||||
issue["commit_hash"] = commit_hash
|
||||
issue["fixed_at"] = time.strftime("%Y-%m-%dT%H:%M:%SZ", time.gmtime())
|
||||
save_issues(idata)
|
||||
print(f"Updated {issue_id} fix status: {issue['fix_status']}")
|
||||
return
|
||||
print(f"Error: Issue {issue_id} not found.")
|
||||
|
||||
def main():
|
||||
parser = argparse.ArgumentParser(description="Audit Ledger Management Tool")
|
||||
subparsers = parser.add_subparsers(dest="action", required=True)
|
||||
|
||||
# mark-reviewed
|
||||
rev_parser = subparsers.add_parser("mark-reviewed")
|
||||
rev_parser.add_argument("files", nargs="+", help="Files to mark as reviewed")
|
||||
|
||||
# log-issue
|
||||
log_parser = subparsers.add_parser("log-issue")
|
||||
log_parser.add_argument("--file", required=True, help="File path")
|
||||
log_parser.add_argument("--lines", required=True, help="Line range (e.g. 88-94)")
|
||||
log_parser.add_argument("--severity", required=True, type=int, choices=[1, 2, 3], help="Severity 1-3")
|
||||
log_parser.add_argument("--category", required=True, help="Vulnerability category")
|
||||
log_parser.add_argument("--description", required=True, help="1-sentence description")
|
||||
|
||||
# verify-issue
|
||||
ver_parser = subparsers.add_parser("verify-issue")
|
||||
ver_parser.add_argument("--id", required=True, help="Issue ID (e.g. SEC-0001)")
|
||||
ver_parser.add_argument("--status", required=True, choices=["CONFIRMED", "DISPROVEN", "PENDING"], help="Status")
|
||||
ver_parser.add_argument("--test-desc", required=True, help="Test description")
|
||||
ver_parser.add_argument("--test-result", required=True, help="Test outcome summary")
|
||||
|
||||
# record-fix
|
||||
fix_parser = subparsers.add_parser("record-fix")
|
||||
fix_parser.add_argument("--id", required=True, help="Issue ID (e.g. SEC-0001)")
|
||||
fix_parser.add_argument("--fix-desc", required=True, help="Description of the fix")
|
||||
fix_parser.add_argument("--commit-msg", required=True, help="Proposed lowercase commit message")
|
||||
fix_parser.add_argument("--commit-hash", default=None, help="Commit hash if committed")
|
||||
|
||||
args = parser.parse_args()
|
||||
if args.action == "mark-reviewed":
|
||||
mark_reviewed(args.files)
|
||||
elif args.action == "log-issue":
|
||||
log_issue(args.file, args.lines, args.severity, args.category, args.description)
|
||||
elif args.action == "verify-issue":
|
||||
verify_issue(args.id, args.status, args.test_desc, args.test_result)
|
||||
elif args.action == "record-fix":
|
||||
record_fix(args.id, args.fix_desc, args.commit_msg, args.commit_hash)
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
@@ -1,148 +0,0 @@
|
||||
#!/usr/bin/env python3
|
||||
import os
|
||||
import json
|
||||
import time
|
||||
from collections import defaultdict
|
||||
|
||||
REPO_ROOT = os.path.abspath(os.path.join(os.path.dirname(__file__), ".."))
|
||||
AUDIT_DIR = os.path.join(REPO_ROOT, "audit")
|
||||
FILES_LEDGER = os.path.join(AUDIT_DIR, "files_ledger.json")
|
||||
ISSUES_LEDGER = os.path.join(AUDIT_DIR, "issues_ledger.json")
|
||||
DASHBOARD_MD = os.path.join(AUDIT_DIR, "DASHBOARD.md")
|
||||
AUDIT_LEDGER_MD = os.path.join(AUDIT_DIR, "AUDIT_LEDGER.md")
|
||||
|
||||
def load_json(filepath, default):
|
||||
if not os.path.exists(filepath):
|
||||
return default
|
||||
with open(filepath, "r", encoding="utf-8") as f:
|
||||
return json.load(f)
|
||||
|
||||
def generate_dashboard():
|
||||
fdata = load_json(FILES_LEDGER, {"files": []})
|
||||
idata = load_json(ISSUES_LEDGER, {"issues": []})
|
||||
|
||||
files = fdata.get("files", [])
|
||||
issues = idata.get("issues", [])
|
||||
|
||||
total_files = len(files)
|
||||
reviewed_files = sum(1 for f in files if f.get("status", "").startswith("REVIEWED"))
|
||||
pending_files = total_files - reviewed_files
|
||||
pct_complete = (reviewed_files / total_files * 100) if total_files > 0 else 0.0
|
||||
|
||||
# Issues breakdown
|
||||
sev_counts = {1: 0, 2: 0, 3: 0}
|
||||
status_counts = {"PENDING": 0, "CONFIRMED": 0, "DISPROVEN": 0, "FIXED": 0}
|
||||
cat_counts = defaultdict(int)
|
||||
|
||||
for iss in issues:
|
||||
sev = iss.get("severity", 1)
|
||||
sev_counts[sev] = sev_counts.get(sev, 0) + 1
|
||||
|
||||
vstat = iss.get("verification_status", "PENDING")
|
||||
fstat = iss.get("fix_status", "UNFIXED")
|
||||
if fstat == "FIXED":
|
||||
status_counts["FIXED"] += 1
|
||||
else:
|
||||
status_counts[vstat] = status_counts.get(vstat, 0) + 1
|
||||
|
||||
cat = iss.get("category", "Unknown")
|
||||
cat_counts[cat] += 1
|
||||
|
||||
# Subsystem breakdown
|
||||
subsys_stats = defaultdict(lambda: {"total": 0, "reviewed": 0, "issues": 0})
|
||||
for f in files:
|
||||
ss = f.get("subsystem", "other")
|
||||
subsys_stats[ss]["total"] += 1
|
||||
if f.get("status", "").startswith("REVIEWED"):
|
||||
subsys_stats[ss]["reviewed"] += 1
|
||||
subsys_stats[ss]["issues"] += f.get("issues_count", 0)
|
||||
|
||||
# Render Markdown Dashboard
|
||||
now_str = time.strftime("%Y-%m-%d %H:%M:%S UTC", time.gmtime())
|
||||
md_lines = [
|
||||
"# BRL-CAD RMF/STIG Cat 1 Security Audit Dashboard",
|
||||
f"**Last Updated:** {now_str}",
|
||||
"",
|
||||
"## Overall Progress",
|
||||
f"- **Total C/C++ Files:** {total_files}",
|
||||
f"- **Files Reviewed:** {reviewed_files} ({pct_complete:.1f}%)",
|
||||
f"- **Files Pending Review:** {pending_files}",
|
||||
f"- **Total Issues Identified:** {len(issues)}",
|
||||
"",
|
||||
"### Issues by Severity Potential",
|
||||
"| Severity Level | Count | Description |",
|
||||
"|:---:|:---:|:---|",
|
||||
f"| **3 (High)** | {sev_counts[3]} | Likely exploit or crash potential; widespread/library exposure |",
|
||||
f"| **2 (Medium)** | {sev_counts[2]} | Possible exploit or crash under specific circumstances |",
|
||||
f"| **1 (Low)** | {sev_counts[1]} | Localized / low-impact vulnerability |",
|
||||
"",
|
||||
"### Issues by Verification Status",
|
||||
f"- **Confirmed:** {status_counts.get('CONFIRMED', 0)}",
|
||||
f"- **Fixed (Committed):** {status_counts.get('FIXED', 0)}",
|
||||
f"- **Pending Verification:** {status_counts.get('PENDING', 0)}",
|
||||
f"- **Disproven:** {status_counts.get('DISPROVEN', 0)}",
|
||||
"",
|
||||
"## Subsystem Review Progress",
|
||||
"| Subsystem | Total Files | Reviewed | Progress | Issues Found |",
|
||||
"|:---|:---:|:---:|:---:|:---:|"
|
||||
]
|
||||
|
||||
for ss in sorted(subsys_stats.keys()):
|
||||
stats = subsys_stats[ss]
|
||||
pct = (stats["reviewed"] / stats["total"] * 100) if stats["total"] > 0 else 0
|
||||
md_lines.append(f"| `{ss}` | {stats['total']} | {stats['reviewed']} | {pct:.1f}% | {stats['issues']} |")
|
||||
|
||||
if issues:
|
||||
md_lines.extend([
|
||||
"",
|
||||
"## Identified Issues Summary",
|
||||
"| ID | Severity | Category | File & Location | Verification | Nature of Issue |",
|
||||
"|:---|:---:|:---|:---|:---:|:---|"
|
||||
])
|
||||
for iss in issues:
|
||||
v_badge = iss.get("verification_status", "PENDING")
|
||||
if iss.get("fix_status") == "FIXED":
|
||||
v_badge = "FIXED"
|
||||
md_lines.append(
|
||||
f"| `{iss['id']}` | **Sev {iss['severity']}** | {iss['category']} | `{iss['file']}:{iss['lines']}` | `{v_badge}` | {iss['description']} |"
|
||||
)
|
||||
|
||||
md_content = "\n".join(md_lines) + "\n"
|
||||
with open(DASHBOARD_MD, "w", encoding="utf-8") as f:
|
||||
f.write(md_content)
|
||||
|
||||
# Render Markdown Ledger
|
||||
ledger_lines = [
|
||||
"# BRL-CAD RMF/STIG Cat 1 Vulnerability Tracking Ledger",
|
||||
f"**Last Synchronized:** {now_str}",
|
||||
"",
|
||||
"| Issue ID | File | Lines | Cat 1 Type | Sev | Verification | Fix Status | 1-Sentence Nature of Issue |",
|
||||
"|:---|:---|:---:|:---|:---:|:---:|:---:|:---|"
|
||||
]
|
||||
for iss in issues:
|
||||
v_badge = iss.get("verification_status", "PENDING")
|
||||
fix_badge = iss.get("fix_status", "UNFIXED")
|
||||
ledger_lines.append(
|
||||
f"| `{iss['id']}` | `{iss['file']}` | `{iss['lines']}` | {iss['category']} | {iss['severity']} | `{v_badge}` | `{fix_badge}` | {iss['description']} |"
|
||||
)
|
||||
|
||||
with open(AUDIT_LEDGER_MD, "w", encoding="utf-8") as f:
|
||||
f.write("\n".join(ledger_lines) + "\n")
|
||||
|
||||
# Terminal Output
|
||||
print("=" * 68)
|
||||
print(" BRL-CAD RMF/STIG Cat 1 Security Audit Dashboard")
|
||||
print("=" * 68)
|
||||
print(f" Total C/C++ Files: {total_files}")
|
||||
print(f" Files Reviewed: {reviewed_files} / {total_files} ({pct_complete:.1f}%)")
|
||||
print(f" Files Pending: {pending_files}")
|
||||
print(f" Total Issues: {len(issues)}")
|
||||
print(f" Severity Breakdown: High (3): {sev_counts[3]} | Med (2): {sev_counts[2]} | Low (1): {sev_counts[1]}")
|
||||
print(f" Verification Status: Confirmed: {status_counts.get('CONFIRMED', 0)} | Fixed: {status_counts.get('FIXED', 0)} | Pending: {status_counts.get('PENDING', 0)} | Disproven: {status_counts.get('DISPROVEN', 0)}")
|
||||
print("=" * 68)
|
||||
print(f" Updated dashboard: {DASHBOARD_MD}")
|
||||
print(f" Updated ledger: {AUDIT_LEDGER_MD}")
|
||||
print("=" * 68)
|
||||
|
||||
if __name__ == "__main__":
|
||||
generate_dashboard()
|
||||
-37182
File diff suppressed because it is too large
Load Diff
@@ -1,91 +0,0 @@
|
||||
#!/usr/bin/env python3
|
||||
import os
|
||||
import json
|
||||
import time
|
||||
|
||||
REPO_ROOT = os.path.abspath(os.path.join(os.path.dirname(__file__), ".."))
|
||||
AUDIT_DIR = os.path.join(REPO_ROOT, "audit")
|
||||
FILES_LEDGER = os.path.join(AUDIT_DIR, "files_ledger.json")
|
||||
|
||||
EXTENSIONS = {".c", ".cpp", ".cxx", ".cc", ".h", ".hpp", ".hxx", ".hh"}
|
||||
EXCLUDE_DIRS = {".git", "build", "audit", ".github"}
|
||||
|
||||
def get_subsystem(rel_path):
|
||||
parts = rel_path.split(os.sep)
|
||||
if len(parts) > 1 and parts[0] == "src":
|
||||
if parts[1] == "conv" and len(parts) > 2:
|
||||
return f"src/conv/{parts[2]}"
|
||||
return f"src/{parts[1]}"
|
||||
elif len(parts) > 1 and parts[0] == "include":
|
||||
return "include"
|
||||
elif len(parts) > 1:
|
||||
return parts[0]
|
||||
return "root"
|
||||
|
||||
def count_lines(filepath):
|
||||
try:
|
||||
with open(filepath, "r", encoding="utf-8", errors="ignore") as f:
|
||||
return sum(1 for _ in f)
|
||||
except Exception:
|
||||
return 0
|
||||
|
||||
def main():
|
||||
existing_ledger = {}
|
||||
if os.path.exists(FILES_LEDGER):
|
||||
try:
|
||||
with open(FILES_LEDGER, "r", encoding="utf-8") as f:
|
||||
data = json.load(f)
|
||||
for item in data.get("files", []):
|
||||
existing_ledger[item["path"]] = item
|
||||
except Exception as e:
|
||||
print(f"Warning: could not load existing ledger: {e}")
|
||||
|
||||
files = []
|
||||
for root, dirs, filenames in os.walk(REPO_ROOT):
|
||||
dirs[:] = [d for d in dirs if d not in EXCLUDE_DIRS and not d.startswith("build")]
|
||||
for fn in filenames:
|
||||
ext = os.path.splitext(fn)[1].lower()
|
||||
if ext in EXTENSIONS:
|
||||
full_path = os.path.join(root, fn)
|
||||
rel_path = os.path.relpath(full_path, REPO_ROOT)
|
||||
files.append(rel_path)
|
||||
|
||||
files.sort()
|
||||
|
||||
ledger_entries = []
|
||||
for idx, rel_path in enumerate(files, 1):
|
||||
if rel_path in existing_ledger:
|
||||
entry = existing_ledger[rel_path]
|
||||
entry["id"] = idx
|
||||
ledger_entries.append(entry)
|
||||
else:
|
||||
full_path = os.path.join(REPO_ROOT, rel_path)
|
||||
lines = count_lines(full_path)
|
||||
subsystem = get_subsystem(rel_path)
|
||||
ledger_entries.append({
|
||||
"id": idx,
|
||||
"path": rel_path,
|
||||
"subsystem": subsystem,
|
||||
"lines": lines,
|
||||
"status": "PENDING",
|
||||
"reviewed_at": None,
|
||||
"issues_count": 0,
|
||||
"issue_ids": []
|
||||
})
|
||||
|
||||
output_data = {
|
||||
"metadata": {
|
||||
"created_at": time.strftime("%Y-%m-%dT%H:%M:%SZ", time.gmtime()),
|
||||
"total_files": len(ledger_entries),
|
||||
"extensions": sorted(list(EXTENSIONS))
|
||||
},
|
||||
"files": ledger_entries
|
||||
}
|
||||
|
||||
with open(FILES_LEDGER, "w", encoding="utf-8") as f:
|
||||
json.dump(output_data, f, indent=2)
|
||||
|
||||
print(f"Successfully indexed {len(ledger_entries)} C/C++ files into {FILES_LEDGER}")
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
File diff suppressed because it is too large
Load Diff
+35
-91
@@ -1,102 +1,46 @@
|
||||
add_subdirectory(ref)
|
||||
|
||||
add_definitions(-DCONSOLE)
|
||||
include_directories(${BU_INCLUDE_DIRS})
|
||||
|
||||
brlcad_addexec(pixcmp pixcmp.c libbu)
|
||||
brlcad_add_test(
|
||||
NAME bench_pixcmp_tolerance
|
||||
COMMAND
|
||||
${CMAKE_COMMAND} "-DPIXCMP=$<TARGET_FILE:pixcmp>" "-DTEST_DIR=${CMAKE_CURRENT_BINARY_DIR}"
|
||||
-P "${CMAKE_CURRENT_SOURCE_DIR}/pixcmp_test.cmake"
|
||||
)
|
||||
set(BARK_SOURCES benchmark.c compute.c run.c clean.c)
|
||||
brlcad_addexec(bark "${BARK_SOURCES}" "libbu;${M_LIBRARY}" NO_STRICT NO_INSTALL TEST_USESDATA)
|
||||
|
||||
if(BUILD_TESTING)
|
||||
configure_file(run.sh "${CMAKE_CURRENT_BINARY_DIR}/benchmark" COPYONLY)
|
||||
install(PROGRAMS "${CMAKE_CURRENT_BINARY_DIR}/benchmark" DESTINATION ${BIN_DIR})
|
||||
endif(BUILD_TESTING)
|
||||
distclean("${CMAKE_CURRENT_BINARY_DIR}/benchmark")
|
||||
|
||||
if(BUILD_TESTING)
|
||||
add_custom_command(
|
||||
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/benchmark-done
|
||||
COMMAND "${CMAKE_COMMAND}" -E copy_if_different ${CMAKE_CURRENT_SOURCE_DIR}/run.sh $<TARGET_FILE_DIR:bark>/benchmark
|
||||
COMMAND "${CMAKE_COMMAND}" -E touch ${CMAKE_CURRENT_BINARY_DIR}/benchmark-done
|
||||
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/run.sh
|
||||
)
|
||||
add_custom_target(benchmark_cp ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/benchmark-done)
|
||||
set_target_properties(benchmark_cp PROPERTIES FOLDER "Benchmark")
|
||||
endif(BUILD_TESTING)
|
||||
distclean(${CMAKE_BINARY_DIR}/${BIN_DIR}/benchmark)
|
||||
|
||||
file(WRITE "${CMAKE_BINARY_DIR}/CMakeTmp/benchmsg.cmake" "message(\"---\")\n")
|
||||
file(
|
||||
APPEND
|
||||
"${CMAKE_BINARY_DIR}/CMakeTmp/benchmsg.cmake"
|
||||
"message(\"Run 'make benchmark-clean' in the bench directory to delete the logic\")\n"
|
||||
)
|
||||
file(
|
||||
APPEND
|
||||
"${CMAKE_BINARY_DIR}/CMakeTmp/benchmsg.cmake"
|
||||
"message(\"and image files generated during the benchmark analysis.\")\n"
|
||||
add_definitions(
|
||||
-DHAVE_CONFIG_H
|
||||
-DBRLCADBUILD
|
||||
-DCONSOLE
|
||||
)
|
||||
|
||||
cmakefiles(
|
||||
CMakeLists.txt
|
||||
pixcmp_test.cmake
|
||||
run.sh
|
||||
try.sh
|
||||
viewdiff.sh
|
||||
)
|
||||
BRLCAD_ADDEXEC(pixcmp pixcmp.c libbu)
|
||||
|
||||
if(SH_EXEC AND TARGET m35.g AND BUILD_TESTING)
|
||||
# CTest enabled short run of the benchmark suite
|
||||
brlcad_add_test(NAME benchmark COMMAND ${SH_EXEC} "$<TARGET_FILE_DIR:bark>/benchmark" run TIMEFRAME=1)
|
||||
set_tests_properties(benchmark PROPERTIES LABELS "Benchmark")
|
||||
add_custom_target(
|
||||
benchmark-check
|
||||
COMMAND ${CMAKE_CTEST_COMMAND} -L Benchmark --output-on-failure
|
||||
DEPENDS rt pixcmp BENCHMARK_PIX_cp PIX_LOG_cp benchmark_cp
|
||||
)
|
||||
add_dependencies(
|
||||
benchmark-check
|
||||
bldg391.g
|
||||
m35.g
|
||||
moss.g
|
||||
sphflake.g
|
||||
star.g
|
||||
world.g
|
||||
)
|
||||
set_target_properties(benchmark-check PROPERTIES FOLDER "Benchmark")
|
||||
if(TARGET check)
|
||||
add_dependencies(check benchmark-check)
|
||||
endif(TARGET check)
|
||||
configure_file(run.sh ${CMAKE_CURRENT_BINARY_DIR}/benchmark COPYONLY)
|
||||
install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/benchmark DESTINATION ${BIN_DIR})
|
||||
if(CMAKE_CONFIGURATION_TYPES)
|
||||
foreach(CFG_TYPE ${CMAKE_CONFIGURATION_TYPES})
|
||||
string(TOUPPER "${CFG_TYPE}" CFG_TYPE_UPPER)
|
||||
configure_file(run.sh ${CMAKE_BINARY_DIR_${CFG_TYPE_UPPER}}/bin/benchmark COPYONLY)
|
||||
endforeach(CFG_TYPE ${CMAKE_CONFIGURATION_TYPES})
|
||||
else(CMAKE_CONFIGURATION_TYPES)
|
||||
configure_file(run.sh ${CMAKE_BINARY_DIR}/bin/benchmark COPYONLY)
|
||||
endif(CMAKE_CONFIGURATION_TYPES)
|
||||
|
||||
# Full run of the benchmark suite
|
||||
add_custom_target(
|
||||
benchmark
|
||||
COMMAND ${SH_EXEC} $<TARGET_FILE_DIR:bark>/benchmark run
|
||||
COMMAND ${CMAKE_COMMAND} -P "${CMAKE_BINARY_DIR}/CMakeTmp/benchmsg.cmake"
|
||||
DEPENDS rt pixcmp BENCHMARK_PIX_cp PIX_LOG_cp benchmark_cp
|
||||
)
|
||||
add_dependencies(
|
||||
benchmark
|
||||
bldg391.g
|
||||
m35.g
|
||||
moss.g
|
||||
sphflake.g
|
||||
star.g
|
||||
world.g
|
||||
)
|
||||
set_target_properties(benchmark PROPERTIES FOLDER "Benchmark")
|
||||
file(WRITE ${CMAKE_BINARY_DIR}/CMakeTmp/benchmsg.cmake "message(\"---\")\n")
|
||||
file(APPEND ${CMAKE_BINARY_DIR}/CMakeTmp/benchmsg.cmake "message(\"Run 'make benchmark-clean' in the bench directory to delete the logic\")\n")
|
||||
file(APPEND ${CMAKE_BINARY_DIR}/CMakeTmp/benchmsg.cmake "message(\"and image files generated during the benchmark analysis.\")\n")
|
||||
|
||||
# benchmark cleanup targets
|
||||
add_custom_target(benchmark-clean ${SH_EXEC} ${CMAKE_BINARY_DIR}/bin/benchmark clean)
|
||||
set_target_properties(benchmark-clean PROPERTIES FOLDER "Benchmark")
|
||||
add_custom_target(benchmark-clobber ${SH_EXEC} ${CMAKE_BINARY_DIR}/bin/benchmark clobber)
|
||||
set_target_properties(benchmark-clobber PROPERTIES FOLDER "Benchmark")
|
||||
endif(SH_EXEC AND TARGET m35.g AND BUILD_TESTING)
|
||||
CMAKEFILES(lgt.sh run.sh try.sh viewdiff.sh)
|
||||
|
||||
if(SH_EXEC)
|
||||
add_custom_target(benchmark
|
||||
COMMAND ${SH_EXEC} ${CMAKE_BINARY_DIR}/bin/benchmark run
|
||||
COMMAND ${CMAKE_COMMAND} -P ${CMAKE_BINARY_DIR}/CMakeTmp/benchmsg.cmake
|
||||
DEPENDS rt pixcmp BENCHMARK_PIX_cp PIX_LOG_cp
|
||||
)
|
||||
add_dependencies(benchmark bldg391.g m35.g moss.g sphflake.g star.g world.g)
|
||||
add_custom_target(benchmark-clean
|
||||
${SH_EXEC} ${CMAKE_BINARY_DIR}/bin/benchmark clean
|
||||
)
|
||||
add_custom_target(benchmark-clobber
|
||||
${SH_EXEC} ${CMAKE_BINARY_DIR}/bin/benchmark clobber
|
||||
)
|
||||
endif(SH_EXEC)
|
||||
|
||||
# Local Variables:
|
||||
# tab-width: 8
|
||||
|
||||
@@ -1,984 +0,0 @@
|
||||
/* B E N C H M A R K . C
|
||||
* BRL-CAD
|
||||
*
|
||||
* Copyright (c) 2011-2026 United States Government as represented by
|
||||
* the U.S. Army Research Laboratory.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above
|
||||
* copyright notice, this list of conditions and the following
|
||||
* disclaimer in the documentation and/or other materials provided
|
||||
* with the distribution.
|
||||
*
|
||||
* 3. The name of the author may not be used to endorse or promote
|
||||
* products derived from this software without specific prior written
|
||||
* permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
|
||||
* OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
|
||||
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
|
||||
* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
||||
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
/** @file benchmark.c
|
||||
*
|
||||
* This is the BRL-CAD Benchmark.
|
||||
*
|
||||
* The benchmark suite will test the performance of a system by
|
||||
* iteratively rendering several well-known datasets into 512x512
|
||||
* images where performance metrics are documented and fairly well
|
||||
* understood. The local machine's performance is compared to the
|
||||
* base system (called VGR) and a numeric "VGR" multiplier of
|
||||
* performance is computed. This number is a simplified metric from
|
||||
* which one may qualitatively compare cpu and cache performance,
|
||||
* versions of BRL-CAD, and different compiler characteristics.
|
||||
*
|
||||
*/
|
||||
|
||||
#include "common.h"
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <time.h>
|
||||
#include <sys/stat.h>
|
||||
/* TODO - fall back on https://github.com/sandsmark/winuname for Windows? */
|
||||
#ifdef HAVE_SYS_UTSNAME_H
|
||||
# include <sys/utsname.h>
|
||||
#endif
|
||||
|
||||
#include "bio.h"
|
||||
|
||||
#include "bu.h"
|
||||
|
||||
|
||||
/* TODO: !!! probably will need variants of these */
|
||||
int bu_exec(const char *program, void *data, struct bu_vls *out, struct bu_vls *err) {if (!program || !out || !err || !data) return 1; return 0;}
|
||||
int bu_grep(const char *pattern, const char *input, int(*callback)(const char *line, void *data), void *data) {if (!pattern || !input || !data) return 1; if (!callback) bu_log("TODO: need default callback!!!\n"); return 0;}
|
||||
int bu_file_glob(const char *pattern, char **paths) {if (!pattern || !paths) return 1; return 0;}
|
||||
const char *format_elapsed(double elapsed) {if (elapsed > 0) return "0 1 2"; return "-0 -1 -2";}
|
||||
int perf(const struct bu_vls *vp, const char *items, const char *args[]) {if (!vp || !items || !args) return -1; return 0;}
|
||||
double calculate_vgr(const struct bu_vls *summary) {if (!summary) return -0.0; return 0.0;}
|
||||
extern int bench(const char *cmd);
|
||||
|
||||
|
||||
/**
|
||||
* this routine writes the provided argument(s) to a log file as well
|
||||
* as echoing them to stdout if we're not in quiet mode.
|
||||
*/
|
||||
static void
|
||||
record(const char *fmt, ...)
|
||||
{
|
||||
struct bu_vls str = BU_VLS_INIT_ZERO;
|
||||
va_list ap;
|
||||
|
||||
const char *LOGFILE = getenv("LOGFILE");
|
||||
const char *QUIET = getenv("QUIET");
|
||||
|
||||
if (!fmt) {
|
||||
return;
|
||||
}
|
||||
|
||||
va_start(ap, fmt);
|
||||
bu_vls_vprintf(&str, fmt, ap);
|
||||
va_end(ap);
|
||||
|
||||
if (!BU_STR_EMPTY(LOGFILE)) {
|
||||
FILE *fp = fopen(LOGFILE, "a");
|
||||
if (fp) {
|
||||
fprintf(fp, "%s", bu_vls_cstr(&str));
|
||||
fclose(fp);
|
||||
}
|
||||
}
|
||||
if (bu_str_false(QUIET)) {
|
||||
bu_log("%s", bu_vls_cstr(&str));
|
||||
}
|
||||
|
||||
bu_vls_free(&str);
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
display(const char *fmt, ...)
|
||||
{
|
||||
struct bu_vls str = BU_VLS_INIT_ZERO;
|
||||
va_list ap;
|
||||
|
||||
if (!fmt) {
|
||||
return;
|
||||
}
|
||||
|
||||
va_start(ap, fmt);
|
||||
bu_vls_vprintf(&str, fmt, ap);
|
||||
va_end(ap);
|
||||
bu_log("%s", bu_vls_cstr(&str));
|
||||
|
||||
bu_vls_free(&str);
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
sink(const char *fmt, ...)
|
||||
{
|
||||
if (!fmt) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/************************
|
||||
* search for resources *
|
||||
************************/
|
||||
typedef enum {
|
||||
executable=0x1,
|
||||
file=0x2,
|
||||
directory=0x4,
|
||||
script=0x8
|
||||
} look_for_type_t;
|
||||
|
||||
#define TYPE2STR(_t) \
|
||||
((_t) == executable) ? "executable" : \
|
||||
((_t) == file) ? "file" : \
|
||||
((_t) == directory) ? "directory" : \
|
||||
((_t) == script) ? "script" : \
|
||||
"unknown"
|
||||
|
||||
static void
|
||||
look_for(void (*verbose)(const char *, ...), look_for_type_t type, const char *label, const char *var, const char*paths[])
|
||||
{
|
||||
char *val;
|
||||
|
||||
/* utility function to search for a certain filesystem object in a
|
||||
* list of paths.
|
||||
*/
|
||||
|
||||
if (!var || !paths) {
|
||||
return;
|
||||
}
|
||||
if (!verbose) {
|
||||
verbose = sink;
|
||||
}
|
||||
|
||||
verbose("Looking for %s\n", label);
|
||||
|
||||
/* get the value of the variable */
|
||||
val = getenv(var);
|
||||
|
||||
if (val && (strlen(val) > 0)) {
|
||||
if (label) {
|
||||
verbose("...using %s from %s variable setting\n", val, var);
|
||||
}
|
||||
} else {
|
||||
while (paths && *paths) {
|
||||
int failed=0;
|
||||
|
||||
switch (type) {
|
||||
default:
|
||||
case directory:
|
||||
/* should work without read bit */
|
||||
if (!bu_file_directory(*paths)) {
|
||||
failed=1;
|
||||
}
|
||||
/* fall through */
|
||||
case executable:
|
||||
case script:
|
||||
if (!bu_file_executable(*paths)) {
|
||||
failed=1;
|
||||
}
|
||||
break;
|
||||
case file:
|
||||
if (!bu_file_exists(*paths, NULL)) {
|
||||
failed=1;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
if (!failed) {
|
||||
verbose("...found %s %s\n", TYPE2STR(type), *paths);
|
||||
bu_setenv(var, *paths, 1);
|
||||
break;
|
||||
}
|
||||
|
||||
paths++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
set_if_unset(void (*echo)(const char *, ...), void (*verbose)(const char *, ...), const char *var, const char *val)
|
||||
{
|
||||
if (!var || !val) {
|
||||
return;
|
||||
}
|
||||
|
||||
const char *setval = getenv(var);
|
||||
|
||||
if (!echo) {
|
||||
echo = sink;
|
||||
}
|
||||
|
||||
if (!verbose) {
|
||||
verbose = sink;
|
||||
}
|
||||
|
||||
if (!setval || (strlen(setval) == 0)) {
|
||||
verbose("%s=\"%s\"\n", var, val);
|
||||
bu_setenv(var, val, 1);
|
||||
}
|
||||
|
||||
setval = getenv(var);
|
||||
echo("Using [%s] for %s\n", setval ? setval : "", var);
|
||||
}
|
||||
|
||||
|
||||
/* callback to bu_grep() */
|
||||
static int
|
||||
stashline(const char *line, void *data)
|
||||
{
|
||||
struct bu_vls *vls = (struct bu_vls *)data;
|
||||
|
||||
BU_CK_VLS(vls);
|
||||
|
||||
bu_vls_printf(vls, "%s\n", line);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
main(int ac, char *av[])
|
||||
{
|
||||
int arg;
|
||||
struct bu_vls rtargs = BU_VLS_INIT_ZERO;
|
||||
struct bu_vls str = BU_VLS_INIT_ZERO;
|
||||
|
||||
const char *RT = NULL;
|
||||
const char *DB = NULL;
|
||||
const char *PIX = NULL;
|
||||
const char *LOG = NULL;
|
||||
const char *CMP = NULL;
|
||||
const char *ELP = NULL;
|
||||
|
||||
char root[MAXPATHLEN] = {0};
|
||||
char db[MAXPATHLEN] = {0};
|
||||
char pix[MAXPATHLEN] = {0};
|
||||
char thisp[MAXPATHLEN] = {0};
|
||||
char *argv[MAXPATHLEN] = {NULL};
|
||||
struct bu_vls vp = BU_VLS_INIT_ZERO;
|
||||
|
||||
long MAXTIME = 0;
|
||||
long TIMEFRAME = 0;
|
||||
|
||||
int64_t start = 0;
|
||||
int ret = 0;
|
||||
|
||||
void (*verbose_echo)(const char *, ...) = sink;
|
||||
void (*echo)(const char *, ...) = record;
|
||||
|
||||
if (ac > 0 && av && av[0]) {
|
||||
bu_setprogname(av[0]);
|
||||
} else {
|
||||
bu_setprogname("benchmark");
|
||||
}
|
||||
|
||||
/* process the argument list for commands */
|
||||
for (arg=1; arg<ac; arg++) {
|
||||
char *eq;
|
||||
if (BU_STR_EQUAL(av[arg], "clean")) {
|
||||
bu_setenv("CLEAN", "1", 1);
|
||||
continue;
|
||||
}
|
||||
if (BU_STR_EQUAL(av[arg], "clobber")) {
|
||||
bu_setenv("CLEAN", "1", 1);
|
||||
bu_setenv("CLOBBER", "1", 1);
|
||||
continue;
|
||||
}
|
||||
if (BU_STR_EQUAL(av[arg], "h")) {
|
||||
bu_setenv("HELP", "1", 1);
|
||||
continue;
|
||||
}
|
||||
if (BU_STR_EQUAL(av[arg], "help")) {
|
||||
bu_setenv("HELP", "1", 1);
|
||||
continue;
|
||||
}
|
||||
if (bu_strncasecmp(av[arg], "instruct", 8) == 0) {
|
||||
bu_setenv("INSTRUCTIONS", "1", 1);
|
||||
continue;
|
||||
}
|
||||
if (BU_STR_EQUAL(av[arg], "start")) {
|
||||
continue;
|
||||
}
|
||||
if (BU_STR_EQUAL(av[arg], "quiet")) {
|
||||
bu_setenv("QUIET", "1", 1);
|
||||
continue;
|
||||
}
|
||||
if (BU_STR_EQUAL(av[arg], "verbose")) {
|
||||
bu_setenv("VERBOSE", "1", 1);
|
||||
continue;
|
||||
}
|
||||
if (BU_STR_EQUAL(av[arg], "run")) {
|
||||
bu_setenv("RUN", "1", 1);
|
||||
continue;
|
||||
}
|
||||
eq = strchr(av[arg], '=');
|
||||
if (eq) {
|
||||
char *var = bu_strdup(av[arg]);
|
||||
char *eq_in_var = var + (eq - av[arg]);
|
||||
*eq_in_var = '\0';
|
||||
bu_setenv(var, eq_in_var + 1, 1);
|
||||
bu_free(var, "strdup av[arg]");
|
||||
continue;
|
||||
}
|
||||
bu_log("WARNING: Passing unknown option [%s] to RT\n", av[arg]);
|
||||
bu_vls_printf(&rtargs, " %s", av[arg]);
|
||||
}
|
||||
|
||||
|
||||
/***
|
||||
* handle help before main processing
|
||||
***/
|
||||
if (bu_str_true(getenv("HELP"))) {
|
||||
bu_log("Usage: %s [command(s)] [OPTION=value] [RT_OPTIONS]\n", bu_getprogname());
|
||||
bu_log("\n");
|
||||
bu_log("Available commands:\n");
|
||||
bu_log(" clean\n");
|
||||
bu_log(" clobber\n");
|
||||
bu_log(" help (this is what you are reading right now)\n");
|
||||
bu_log(" instructions\n");
|
||||
bu_log(" quiet\n");
|
||||
bu_log(" verbose\n");
|
||||
bu_log(" run (this is probably what you want)\n");
|
||||
bu_log("\n");
|
||||
bu_log("Available options:\n");
|
||||
bu_log(" RT=/path/to/rt_binary (e.g., rt)\n");
|
||||
bu_log(" DB=/path/to/reference/geometry (e.g. ../db)\n");
|
||||
bu_log(" PIX=/path/to/reference/images (e.g., ../pix)\n");
|
||||
bu_log(" LOG=/path/to/reference/logs (e.g., ../pix)\n");
|
||||
bu_log(" CMP=/path/to/pixcmp_tool (e.g., pixcmp)\n");
|
||||
bu_log(" ELP=/path/to/time_tool (e.g., elapsed.sh)\n");
|
||||
bu_log(" TIMEFRAME=#seconds (default 32)\n");
|
||||
bu_log(" MAXTIME=#seconds (default 300)\n");
|
||||
bu_log(" DEVIATION=%%deviation (default 3)\n");
|
||||
bu_log(" AVERAGE=#frames (default 3)\n");
|
||||
bu_log("\n");
|
||||
bu_log("Available RT options:\n");
|
||||
bu_log(" -P# (e.g., -P1 to force single CPU)\n");
|
||||
bu_log(" See the 'rt' manpage for additional options\n");
|
||||
bu_log("\n");
|
||||
bu_log("The BRL-CAD Benchmark tests the overall performance of a system\n");
|
||||
bu_log("compared to a stable well-known baseline. The Benchmark calculates a\n");
|
||||
bu_log("figure-of-merit for this system that may be directly compared to other\n");
|
||||
bu_log("Benchmark runs on other system configurations.\n");
|
||||
bu_log("\n");
|
||||
bu_log("BRL-CAD is a powerful cross-platform open source solid modeling system.\n");
|
||||
bu_log("For more information about BRL-CAD, see http://brlcad.org\n");
|
||||
bu_log("\n");
|
||||
bu_log("Run '%s instructions' or see the manpage for additional information.\n", bu_getprogname());
|
||||
bu_vls_free(&rtargs);
|
||||
bu_vls_free(&vp);
|
||||
bu_vls_free(&str);
|
||||
bu_exit(1, NULL);
|
||||
}
|
||||
|
||||
|
||||
/***
|
||||
* handle instructions before main processing
|
||||
***/
|
||||
if (bu_str_true(getenv("INSTRUCTIONS"))) {
|
||||
bu_log("\n");
|
||||
bu_log("This program runs the BRL-CAD Benchmark. The benchmark suite will\n");
|
||||
bu_log("test the performance of a system by iteratively rendering several\n");
|
||||
bu_log("well-known datasets into 512x512 images where performance metrics are\n");
|
||||
bu_log("documented and fairly well understood. The local machine's\n");
|
||||
bu_log("performance is compared to the base system (called VGR) and a numeric\n");
|
||||
bu_log("\"VGR\" multiplier of performance is computed. This number is a\n");
|
||||
bu_log("simplified metric from which one may qualitatively compare cpu and\n");
|
||||
bu_log("cache performance, versions of BRL-CAD, and different compiler\n");
|
||||
bu_log("characteristics.\n");
|
||||
bu_log("\n");
|
||||
bu_log("The suite is intended to be run from a source distribution of BRL-CAD\n");
|
||||
bu_log("after the package has been compiled either directly or via a make\n");
|
||||
bu_log("build system target. There are, however, several environment\n");
|
||||
bu_log("variables that will modify how the BRL-CAD benchmark behaves so that\n");
|
||||
bu_log("it may be run in a stand-alone environment:\n");
|
||||
bu_log("\n");
|
||||
bu_log(" RT - the rt binary (e.g. ../src/rt/rt or /usr/brlcad/bin/rt)\n");
|
||||
bu_log(" DB - the directory containing the reference geometry (e.g. ../db)\n");
|
||||
bu_log(" PIX - the directory containing the reference images (e.g. ../pix)\n");
|
||||
bu_log(" LOG - the directory containing the reference logs (e.g. ../pix)\n");
|
||||
bu_log(" CMP - the name of a pixcmp tool (e.g. ./pixcmp or cmp)\n");
|
||||
bu_log(" ELP - the name of an elapsed time tool (e.g. ../sh/elapsed.sh)\n");
|
||||
bu_log(" TIMEFRAME - the minimum number of seconds each trace needs to take\n");
|
||||
bu_log(" MAXTIME - the maximum number of seconds to spend on any test\n");
|
||||
bu_log(" DEVIATION - the minimum sufficient %% deviation from the average\n");
|
||||
bu_log(" AVERAGE - how many frames to average together\n");
|
||||
bu_log(" VERBOSE - turn on extra debug output for testing/development\n");
|
||||
bu_log(" QUIET - turn off all printing output (writes results to summary)\n");
|
||||
bu_log(" INSTRUCTIONS - display detailed instructions\n");
|
||||
bu_log(" RUN - start a benchmark analysis\n");
|
||||
bu_log("\n");
|
||||
bu_log("The TIMEFRAME, MAXTIME, DEVIATION, and AVERAGE options control how the\n");
|
||||
bu_log("benchmark will proceed including how long it should take. Each\n");
|
||||
bu_log("individual benchmark run will consume at least a minimum TIMEFRAME of\n");
|
||||
bu_log("wallclock time so that the results can stabilize. After consuming at\n");
|
||||
bu_log("least the minimum TIMEFRAME, additional frames may be computed until\n");
|
||||
bu_log("the standard deviation from the last AVERAGE count of frames is below\n");
|
||||
bu_log("the specified DEVIATION. When a test is run and it completes in less\n");
|
||||
bu_log("than TIMEFRAME, the raytrace is restarted using double the number of\n");
|
||||
bu_log("rays from the previous run. If the machine is fast enough, the\n");
|
||||
bu_log("benchmark may accelerate the number or rays being fired. These\n");
|
||||
bu_log("additional rays are hypersampled but without any jitter, so it's\n");
|
||||
bu_log("effectively performing a multiplier amount of work over the initial\n");
|
||||
bu_log("frame.\n");
|
||||
bu_log("\n");
|
||||
bu_log("Please send your BRL-CAD Benchmark results to the developers along with\n");
|
||||
bu_log("detailed system information to <devs@brlcad.org>. Include at least:\n");
|
||||
bu_log("\n");
|
||||
bu_log(" 0) Compiler name and version (e.g. gcc --version)\n");
|
||||
bu_log(" 1) All generated log files (i.e. *.log* after benchmark completes)\n");
|
||||
bu_log(" 2) Anything else you think might be relevant to performance\n");
|
||||
bu_log("\n");
|
||||
bu_log("The manual page has even more information and specific usage examples.\n");
|
||||
bu_log("Run 'brlman benchmark'.\n");
|
||||
bu_log("\n");
|
||||
bu_vls_free(&rtargs);
|
||||
bu_vls_free(&vp);
|
||||
bu_vls_free(&str);
|
||||
bu_exit(0, NULL);
|
||||
}
|
||||
|
||||
|
||||
/***
|
||||
* handle clean/clobber before main processing
|
||||
***/
|
||||
if (bu_str_true(getenv("CLEAN"))) {
|
||||
size_t i;
|
||||
size_t cnt;
|
||||
size_t num;
|
||||
char cwd[MAXPATHLEN] = {0};
|
||||
const char *tests[] = {"moss", "world", "star", "bldg391", "m35", "sphflake", NULL};
|
||||
char **paths = NULL;
|
||||
int printed = 0;
|
||||
|
||||
bu_log("\n");
|
||||
if (bu_str_true(getenv("CLOBBER"))) {
|
||||
bu_log("About to wipe out all benchmark images and log files in %s\n", bu_getcwd(cwd, MAXPATHLEN));
|
||||
bu_log("Send SIGINT (type ^C) within 5 seconds to abort\n");
|
||||
sleep(5);
|
||||
} else {
|
||||
bu_log("Deleting most benchmark images and log files in %s\n", bu_getcwd(cwd, MAXPATHLEN));
|
||||
bu_log("Running '%s clobber' will remove run logs.\n", bu_getprogname());
|
||||
}
|
||||
bu_log("\n");
|
||||
|
||||
for (i=0; tests[i]; i++) {
|
||||
struct bu_vls pattern_str = BU_VLS_INIT_ZERO;
|
||||
char *pattern[5] = {NULL, NULL, NULL, NULL, NULL};
|
||||
size_t j;
|
||||
|
||||
/* rm -f $i.log $i.pix $i-[0-9]*.log $i-[0-9]*.pix */
|
||||
bu_vls_printf(&pattern_str, "%s.log %s.pix %s-[0-9]*.log %s-[0-9]*.pix", tests[i], tests[i], tests[i], tests[i]);
|
||||
bu_log("rm -f %s\n", bu_vls_cstr(&pattern_str));
|
||||
|
||||
j = bu_argv_from_string(pattern, 4, bu_vls_addr(&pattern_str));
|
||||
while (j > 0) {
|
||||
num = bu_file_glob(pattern[j-1], paths);
|
||||
if (!num || !paths || !paths[0]) {
|
||||
j--;
|
||||
continue;
|
||||
}
|
||||
cnt = num;
|
||||
while (num > 0) {
|
||||
bu_file_delete(paths[num-1]);
|
||||
num--;
|
||||
}
|
||||
bu_argv_free(cnt, paths);
|
||||
paths = NULL;
|
||||
j--;
|
||||
}
|
||||
bu_vls_free(&pattern_str);
|
||||
}
|
||||
|
||||
if (bu_str_true(getenv("CLOBBER"))) {
|
||||
/* NEVER automatically delete the summary file, but go
|
||||
* ahead with the rest.
|
||||
*/
|
||||
|
||||
num = bu_file_glob("benchmark-[0-9]*-run.log", paths);
|
||||
cnt = num;
|
||||
while (num > 0) {
|
||||
if (paths) {
|
||||
bu_log("rm -f %s\n", paths[num-1]);
|
||||
bu_file_delete(paths[num-1]);
|
||||
}
|
||||
num--;
|
||||
}
|
||||
bu_argv_free(cnt, paths);
|
||||
paths = NULL;
|
||||
}
|
||||
|
||||
if (bu_file_exists("summary", NULL)) {
|
||||
if (!printed) {
|
||||
bu_log("\nThe following files must be removed manually:\n");
|
||||
printed=1;
|
||||
}
|
||||
bu_log("summary ");
|
||||
}
|
||||
num = bu_file_glob("benchmark-[0-9]*-run.log", paths);
|
||||
cnt = num;
|
||||
while (num > 0) {
|
||||
if (!printed) {
|
||||
bu_log("\nThe following files must be removed manually:\n");
|
||||
printed=1;
|
||||
}
|
||||
if (paths)
|
||||
bu_log("%s ", paths[num-1]);
|
||||
num--;
|
||||
}
|
||||
bu_argv_free(cnt, paths);
|
||||
paths = NULL;
|
||||
|
||||
if (printed) {
|
||||
bu_log("\n");
|
||||
}
|
||||
|
||||
if (bu_str_true(getenv("CLOBBER"))) {
|
||||
bu_log("\nBenchmark clobber complete.\n");
|
||||
} else {
|
||||
bu_log("\nBenchmark clean complete.\n");
|
||||
}
|
||||
bu_vls_free(&rtargs);
|
||||
bu_vls_free(&vp);
|
||||
bu_vls_free(&str);
|
||||
bu_exit(0, NULL);
|
||||
}
|
||||
|
||||
|
||||
/***
|
||||
* B E G I N
|
||||
***/
|
||||
|
||||
if (bu_str_false(getenv("RUN"))) {
|
||||
bu_vls_free(&rtargs);
|
||||
bu_vls_free(&vp);
|
||||
bu_vls_free(&str);
|
||||
bu_exit(1, "Type '%s help' for usage.\n", bu_getprogname());
|
||||
}
|
||||
|
||||
/* where to write results */
|
||||
{
|
||||
int fd;
|
||||
const char *logfile;
|
||||
bu_vls_trunc(&str, 0);
|
||||
bu_vls_printf(&str, "run-%d-benchmark.log", bu_pid());
|
||||
logfile = bu_vls_cstr(&str);
|
||||
bu_setenv("LOGFILE", logfile, 1);
|
||||
fd = open(logfile, O_WRONLY|O_CREAT, S_IRUSR | S_IWUSR);
|
||||
if (fd < 0 || !bu_file_writable(logfile)) {
|
||||
if (!BU_STR_EQUAL(logfile, "/dev/null")) {
|
||||
bu_log("ERROR: Unable to log to %s\n", logfile);
|
||||
}
|
||||
/* FIXME: not valid logfile on windows, use 'nul' */
|
||||
bu_setenv("LOGFILE", "/dev/null", 1);
|
||||
}
|
||||
if (fd >= 0) {
|
||||
close(fd);
|
||||
}
|
||||
}
|
||||
|
||||
if (bu_str_true(getenv("QUIET"))) {
|
||||
if (bu_str_true(getenv("VERBOSE"))) {
|
||||
bu_log("Verbose output quelled by quiet option. Further output disabled.\n");
|
||||
}
|
||||
} else {
|
||||
if (bu_str_true(getenv("VERBOSE"))) {
|
||||
verbose_echo=display;
|
||||
bu_log("Verbose output enabled\n");
|
||||
}
|
||||
}
|
||||
|
||||
{
|
||||
struct bu_vls v = BU_VLS_INIT_ZERO;
|
||||
char rfc2822[1024] = {0};
|
||||
const char *logfile = getenv("LOGFILE");
|
||||
#ifdef HAVE_SYS_UTSNAME_H
|
||||
struct utsname n;
|
||||
time_t t = time(NULL);
|
||||
strftime(rfc2822, sizeof(rfc2822), "%a, %d %b %Y %H:%M:%S %Z", localtime(&t));
|
||||
|
||||
if (uname(&n) == 0) {
|
||||
bu_vls_printf(&v, "%s %s %s %s %s", n.sysname, n.nodename, n.release, n.version, n.machine);
|
||||
} else {
|
||||
bu_vls_strcat(&v, "unknown");
|
||||
}
|
||||
#endif
|
||||
|
||||
echo("B R L - C A D B E N C H M A R K\n");
|
||||
echo("=================================\n");
|
||||
echo("Running %s on %s\n", bu_getprogname(), rfc2822);
|
||||
echo("Logging output to %s\n", logfile ? logfile : "disabled");
|
||||
echo("%s\n\n", bu_vls_cstr(&v));
|
||||
bu_vls_free(&v);
|
||||
}
|
||||
|
||||
|
||||
bu_dir(root, MAXPATHLEN, BU_DIR_BIN, NULL);
|
||||
bu_dir(db, MAXPATHLEN, BU_DIR_DATA, "db", NULL);
|
||||
bu_dir(pix, MAXPATHLEN, BU_DIR_DATA, "pix" , NULL);
|
||||
bu_dir(thisp, MAXPATHLEN, BU_DIR_CURR, NULL);
|
||||
|
||||
bu_vls_printf(&vp,
|
||||
"%s/rt "
|
||||
"%s/rt "
|
||||
"./rt",
|
||||
root, thisp);
|
||||
bu_argv_from_string(argv, 32, bu_vls_addr(&vp));
|
||||
look_for(verbose_echo, executable, "the BRL-CAD raytracer", "RT", (const char **)argv);
|
||||
bu_vls_trunc(&vp, 0);
|
||||
|
||||
bu_vls_printf(&vp,
|
||||
"%s/moss.g "
|
||||
"%s/db/moss.g "
|
||||
"%s/../db/moss.g "
|
||||
"./db/moss.g "
|
||||
"./moss.g",
|
||||
db, thisp, thisp);
|
||||
bu_argv_from_string(argv, 32, bu_vls_addr(&vp));
|
||||
look_for(verbose_echo, file, "a benchmark geometry directory", "DB", (const char **)argv);
|
||||
bu_vls_trunc(&vp, 0);
|
||||
if (getenv("DB") && !bu_file_directory(getenv("DB"))) {
|
||||
bu_setenv("DB", bu_path_dirname(getenv("DB")), 1);
|
||||
}
|
||||
|
||||
bu_vls_printf(&vp,
|
||||
"%s/moss.pix "
|
||||
"%s/pix/moss.pix "
|
||||
"%s/../pix/moss.pix "
|
||||
"%s/../../pix/moss.pix "
|
||||
"%s/../../../pix/moss.pix "
|
||||
"./pix/moss.pix "
|
||||
"./moss.pix",
|
||||
pix, thisp, thisp, thisp, thisp);
|
||||
bu_argv_from_string(argv, 32, bu_vls_addr(&vp));
|
||||
look_for(verbose_echo, file, "a benchmark reference image directory", "PIX", (const char **)argv);
|
||||
bu_vls_trunc(&vp, 0);
|
||||
if (getenv("PIX") && !bu_file_directory(getenv("PIX"))) {
|
||||
bu_setenv("PIX", bu_path_dirname(getenv("PIX")), 1);
|
||||
}
|
||||
|
||||
const char *pix_env = getenv("PIX");
|
||||
bu_vls_printf(&vp,
|
||||
"%s "
|
||||
"%s "
|
||||
"%s/pix "
|
||||
"%s/../pix "
|
||||
"%s/../../pix "
|
||||
"%s/../../../pix "
|
||||
"./pix",
|
||||
pix_env ? pix_env : "", pix, thisp, thisp, thisp, thisp);
|
||||
bu_argv_from_string(argv, 32, bu_vls_addr(&vp));
|
||||
look_for(verbose_echo, directory, "a benchmark reference log directory", "LOG", (const char **)argv);
|
||||
bu_vls_trunc(&vp, 0);
|
||||
|
||||
bu_vls_printf(&vp,
|
||||
"%s/pixcmp "
|
||||
"%s/pixcmp "
|
||||
"%s/bench/pixcmp "
|
||||
"%s/../bench/pixcmp "
|
||||
"./pixcmp",
|
||||
root, thisp, thisp, thisp);
|
||||
bu_argv_from_string(argv, 32, bu_vls_addr(&vp));
|
||||
look_for(verbose_echo, executable, "a pixel comparison utility", "CMP", (const char **)argv);
|
||||
bu_vls_trunc(&vp, 0);
|
||||
|
||||
/* FIXME: elapsed is no more */
|
||||
bu_vls_printf(&vp,
|
||||
"%s/elapsed.sh "
|
||||
"%s/elapsed.sh "
|
||||
"%s/sh/elapsed.sh "
|
||||
"%s/../sh/elapsed.sh "
|
||||
"%s/../../sh/elapsed.sh "
|
||||
"%s/../../../sh/elapsed.sh "
|
||||
"./elapsed.sh",
|
||||
root, thisp, thisp, thisp, thisp, thisp);
|
||||
bu_argv_from_string(argv, 32, bu_vls_addr(&vp));
|
||||
look_for(verbose_echo, script, "a time elapsed utility", "ELP", (const char **)argv);
|
||||
bu_vls_trunc(&vp, 0);
|
||||
|
||||
/*********************
|
||||
* output parameters *
|
||||
*********************/
|
||||
|
||||
/* sanity check, output all the final settings together */
|
||||
RT = getenv("RT");
|
||||
if (RT && strlen(RT) > 0) {
|
||||
echo("Using [%s] for RT\n", RT);
|
||||
} else {
|
||||
bu_exit(1, "ERROR: Could not find the BRL-CAD raytracer\n");
|
||||
}
|
||||
|
||||
DB = getenv("DB");
|
||||
if (DB && strlen(DB) > 0) {
|
||||
echo("Using [%s] for DB\n", DB);
|
||||
} else {
|
||||
bu_exit(1, "ERROR: Could not find the BRL-CAD database directory\n");
|
||||
}
|
||||
|
||||
PIX = getenv("PIX");
|
||||
if (PIX && strlen(PIX) > 0) {
|
||||
echo("Using [%s] for PIX\n", PIX);
|
||||
} else {
|
||||
bu_exit(1, "ERROR: Could not find the BRL-CAD reference images\n");
|
||||
}
|
||||
|
||||
LOG = getenv("LOG");
|
||||
if (LOG && strlen(LOG) > 0) {
|
||||
echo("Using [%s] for LOG\n", LOG);
|
||||
} else {
|
||||
bu_exit(1, "ERROR: Could not find the BRL-CAD reference logs\n");
|
||||
}
|
||||
|
||||
CMP = getenv("CMP");
|
||||
if (CMP && strlen(CMP) > 0) {
|
||||
echo("Using [%s] for CMP\n", CMP);
|
||||
} else {
|
||||
bu_exit(1, "ERROR: Could not find the BRL-CAD pixel comparison utility\n");
|
||||
}
|
||||
|
||||
ELP = getenv("ELP");
|
||||
if (ELP && strlen(ELP) > 0) {
|
||||
echo("Using [%s] for ELP\n", ELP);
|
||||
} else {
|
||||
bu_exit(1, "ERROR: Could not find the BRL-CAD time elapsed script\n");
|
||||
}
|
||||
|
||||
/* determine the minimum time requirement in seconds for a single test run */
|
||||
set_if_unset(echo, verbose_echo, "TIMEFRAME", "32");
|
||||
|
||||
/* approximate maximum time in seconds that a given test is allowed to take */
|
||||
set_if_unset(echo, verbose_echo, "MAXTIME", "300");
|
||||
{
|
||||
char *mtimestr = getenv("MAXTIME");
|
||||
MAXTIME = (mtimestr) ? strtol(mtimestr, NULL, 0) : 300;
|
||||
char *timeframestr = getenv("TIMEFRAME");
|
||||
TIMEFRAME = (timeframestr) ? strtol(timeframestr, NULL, 0) : 32;
|
||||
if (MAXTIME < TIMEFRAME) {
|
||||
bu_exit(1, "ERROR: MAXTIME must be greater or equal to TIMEFRAME\n");
|
||||
}
|
||||
}
|
||||
|
||||
/* maximum deviation percentage */
|
||||
set_if_unset(echo, verbose_echo, "DEVIATION", "3");
|
||||
|
||||
/* maximum number of iterations to average */
|
||||
set_if_unset(echo, verbose_echo, "AVERAGE", "3");
|
||||
|
||||
/* end of settings, separate the output */
|
||||
echo("\n");
|
||||
|
||||
|
||||
/**************************
|
||||
* output run-time status *
|
||||
**************************/
|
||||
|
||||
/* determine raytracer version */
|
||||
echo("RT reports the following version information:\n");
|
||||
{
|
||||
struct bu_vls rtout = BU_VLS_INIT_ZERO;
|
||||
struct bu_vls grep1 = BU_VLS_INIT_ZERO;
|
||||
struct bu_vls grep2 = BU_VLS_INIT_ZERO;
|
||||
|
||||
RT = getenv("RT");
|
||||
|
||||
bu_exec(RT, NULL, &rtout, &rtout);
|
||||
bu_grep("BRL-CAD", bu_vls_cstr(&rtout), stashline, (void *)&grep1);
|
||||
bu_grep("Release", bu_vls_cstr(&grep1), stashline, (void *)&grep2);
|
||||
if (bu_vls_strlen(&grep2) > 0) {
|
||||
echo("%s\n", bu_vls_addr(&grep2));
|
||||
} else {
|
||||
echo("Unknown\n\n");
|
||||
}
|
||||
|
||||
bu_vls_free(&grep2);
|
||||
bu_vls_free(&grep1);
|
||||
bu_vls_free(&rtout);
|
||||
}
|
||||
|
||||
/* let the user know about how long this might take */
|
||||
{
|
||||
struct bu_vls elapsed = BU_VLS_INIT_ZERO;
|
||||
double mintime = 6.0 * TIMEFRAME;
|
||||
double maxtime = 6.0 * MAXTIME;
|
||||
double estimate = 3.0 * mintime;
|
||||
|
||||
if (mintime < 1.0)
|
||||
mintime = 0; /* zero is okay */
|
||||
bu_vls_sprintf(&elapsed, "%s", format_elapsed(mintime));
|
||||
echo("Minimum run time is %s\n", bu_vls_cstr(&elapsed));
|
||||
|
||||
if (maxtime < 1.0)
|
||||
maxtime = 1.0; /* zero would be misleading */
|
||||
bu_vls_sprintf(&elapsed, "%s", format_elapsed(maxtime));
|
||||
echo("Maximum run time is %s\n", bu_vls_cstr(&elapsed));
|
||||
|
||||
if (estimate > maxtime)
|
||||
estimate = maxtime;
|
||||
|
||||
echo("Estimated time is %s\n", format_elapsed(estimate));
|
||||
bu_vls_free(&elapsed);
|
||||
}
|
||||
|
||||
/************************
|
||||
* Run the actual tests *
|
||||
************************/
|
||||
|
||||
start = bu_gettime();
|
||||
echo("Running the BRL-CAD Benchmark tests... please wait ...\n\n");
|
||||
|
||||
ret += bench("moss");
|
||||
ret += bench("world");
|
||||
ret += bench("star");
|
||||
ret += bench("bldg391");
|
||||
ret += bench("m35");
|
||||
ret += bench("sphflake");
|
||||
|
||||
echo("\n... Done.\n");
|
||||
echo("Total testing time elapsed: %s\n", format_elapsed(bu_gettime() - start));
|
||||
|
||||
if (ret != 0) {
|
||||
echo("\n");
|
||||
echo("THE BENCHMARK ANALYSIS DID NOT COMPLETE SUCCESSFULLY.\n");
|
||||
echo("\n");
|
||||
echo("A benchmark failure means this is not a viable install of BRL-CAD. This may be\n");
|
||||
echo("a new bug or (more likely) is a compilation configuration error. Ensure your\n");
|
||||
echo("compiler has strict aliasing disabled, compilation is optimized, and you have\n");
|
||||
echo("installed BRL-CAD (some platforms require this). If you still get a failure,\n");
|
||||
echo("please report your configuration information to benchmark@brlcad.org\n");
|
||||
echo("\n");
|
||||
echo("Output was saved to %s from %s\n", LOG, bu_dir(NULL, 0, BU_DIR_CURR, NULL));
|
||||
echo("Run '%s clean' to remove generated pix files.\n", bu_getprogname());
|
||||
echo("Benchmark testing failed.\n");
|
||||
bu_vls_free(&rtargs);
|
||||
bu_vls_free(&vp);
|
||||
bu_vls_free(&str);
|
||||
return 2;
|
||||
}
|
||||
|
||||
/******************************
|
||||
* compute and output results *
|
||||
******************************/
|
||||
{
|
||||
struct bu_vls performance = BU_VLS_INIT_ZERO;
|
||||
ret = perf(&performance, /*...!!!...*/"moss world star bldg391 m35 sphflake", (const char **)argv);
|
||||
|
||||
if (ret == 0) {
|
||||
/* !!! write performance to summary */
|
||||
}
|
||||
|
||||
echo("\n");
|
||||
echo("The following files have been generated and/or modified:\n");
|
||||
echo(" *.log ..... final log files for each individual raytrace test\n");
|
||||
echo(" *.pix ..... final pix image files for each individual raytrace test\n");
|
||||
echo(" *.log.* ... log files for previous frames and raytrace tests\n");
|
||||
echo(" *.pix.* ... pix image files for previous frames and raytrace tests\n");
|
||||
echo(" summary ... performance results summary, 2 lines per run\n");
|
||||
echo("\n");
|
||||
echo("Run '%s clean' to remove generated pix files.\n", bu_getprogname());
|
||||
echo("\n");
|
||||
|
||||
echo("Summary:\n");
|
||||
echo("%s\n", bu_vls_cstr(&performance));
|
||||
|
||||
{
|
||||
double vgr = calculate_vgr(&performance);
|
||||
|
||||
if (vgr > 0.0) {
|
||||
echo("\n");
|
||||
echo("#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#\n");
|
||||
echo("Benchmark results indicate an approximate VGR performance metric of %ld\n", (long int)vgr);
|
||||
echo("Logarithmic VGR metric is %.2lf (natural logarithm is %.2lf)\n", log10(vgr), log(vgr));
|
||||
echo("#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#\n");
|
||||
echo("\n");
|
||||
echo("These numbers seem to indicate that this machine is approximately %ld times", (long int)vgr);
|
||||
echo("faster than the reference machine being used for comparison, a VAX 11/780\n");
|
||||
echo("running 4.3 BSD named VGR. These results are in fact approximately %.2lf", log10(vgr));
|
||||
echo("orders of magnitude faster than the reference.\n");
|
||||
echo("\n");
|
||||
|
||||
echo("Here are some other approximated VGR results for perspective:\n");
|
||||
echo(" 120 on a 200MHz R5000 running IRIX 6.5\n");
|
||||
echo(" 250 on a 500 MHz Pentium III running RedHat 7.1\n");
|
||||
echo(" 550 on a dual 450 MHz UltraSPARC II running SunOS 5.8\n");
|
||||
echo(" 1000 on a dual 500 MHz G4 PowerPC running Mac OS X 10.2\n");
|
||||
echo(" 1500 on a dual 1.66 GHz Athlon MP 2000+ running RedHat 7.3\n");
|
||||
echo(" 52000 on a 4x4 CPU 2.93 GHz Xeon running RHEL Server 5.4\n");
|
||||
echo(" 65000 on a 512 CPU 400 MHz R12000 Running IRIX 6.5\n");
|
||||
echo("\n");
|
||||
}
|
||||
}
|
||||
bu_vls_free(&performance);
|
||||
}
|
||||
|
||||
{
|
||||
/* TODO: !!! determine if this build is optimized or not */
|
||||
/* TODO: !!! determine if this build has run-time debugging */
|
||||
/* TODO: !!! determine if this build has compile-time debugging */
|
||||
}
|
||||
|
||||
/* if this was a valid benchmark run, encourage submission of results. */
|
||||
echo("You are encouraged to submit your benchmark results and system\n");
|
||||
echo("configuration information to benchmark@brlcad.org\n");
|
||||
echo(" ~~~~~~~~~~~~~~~~~~~~\n");
|
||||
|
||||
/* include information about the operating system and hardware in the log */
|
||||
echo("Including additional kernel and hardware information in the log.\n\n");
|
||||
|
||||
/* TODO: !!! print out system information via sysctl/prtdiag/prtconf/hinv/etc */
|
||||
bu_vls_free(&rtargs);
|
||||
|
||||
bu_vls_printf(&vp,
|
||||
"%s/../share/brlcad/*.*.*/doc/benchmark.tr "
|
||||
"%s/share/brlcad/*.*.*/doc/benchmark.tr "
|
||||
"%s/share/brlcad/doc/benchmark.tr "
|
||||
"%s/share/doc/benchmark.tr "
|
||||
"%s/doc/benchmark.tr "
|
||||
"%s/../doc/benchmark.tr "
|
||||
"./benchmark.tr",
|
||||
thisp, thisp, thisp, thisp, thisp, thisp);
|
||||
bu_argv_from_string(argv, 32, bu_vls_addr(&vp));
|
||||
|
||||
look_for(NULL, file, "BENCHMARK_TR", "benchmark", (const char **)argv);
|
||||
bu_vls_trunc(&vp, 0);
|
||||
|
||||
/* TODO: look for benchmark document here? */
|
||||
|
||||
echo("Output was saved to %s from %s\n", LOG, bu_dir(NULL, 0, BU_DIR_CURR, NULL));
|
||||
echo("Benchmark testing complete.\n");
|
||||
|
||||
bu_vls_free(&vp);
|
||||
bu_vls_free(&str);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Local Variables:
|
||||
* tab-width: 8
|
||||
* mode: C
|
||||
* indent-tabs-mode: t
|
||||
* c-file-style: "stroustrup"
|
||||
* End:
|
||||
* ex: shiftwidth=4 tabstop=8
|
||||
*/
|
||||
@@ -1,99 +0,0 @@
|
||||
/* C L E A N . C
|
||||
* BRL-CAD
|
||||
*
|
||||
* Copyright (c) 2011-2026 United States Government as represented by
|
||||
* the U.S. Army Research Laboratory.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above
|
||||
* copyright notice, this list of conditions and the following
|
||||
* disclaimer in the documentation and/or other materials provided
|
||||
* with the distribution.
|
||||
*
|
||||
* 3. The name of the author may not be used to endorse or promote
|
||||
* products derived from this software without specific prior written
|
||||
* permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
|
||||
* OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
|
||||
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
|
||||
* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
||||
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
/** @file clean.c
|
||||
*
|
||||
* utility functions to clean output files
|
||||
*
|
||||
*/
|
||||
|
||||
#include "common.h"
|
||||
|
||||
#include "bu/file.h"
|
||||
#include "bu/str.h"
|
||||
#include "bu/vls.h"
|
||||
|
||||
|
||||
/* TODO: !!! needed */
|
||||
//int bu_file_move(const char *fn1, const char *fn2) {if (!fn1 || !fn2) return -1; return 0;}
|
||||
|
||||
extern int bu_file_copy(const char *fn1, const char *fn2);
|
||||
|
||||
|
||||
/**
|
||||
* conditionally removes or saves any .pix or .log files output.
|
||||
*/
|
||||
void
|
||||
clean_obstacles(const char *base_filename, int id)
|
||||
{
|
||||
struct bu_vls vp = BU_VLS_INIT_ZERO;
|
||||
struct bu_vls vpid = BU_VLS_INIT_ZERO;
|
||||
|
||||
if (BU_STR_EMPTY(base_filename))
|
||||
return;
|
||||
|
||||
/* look for an image file */
|
||||
bu_vls_printf(&vp, "%s.pix", base_filename);
|
||||
if (bu_file_exists(bu_vls_cstr(&vp), NULL)) {
|
||||
bu_vls_printf(&vpid, "%s-%d.pix", base_filename, id);
|
||||
if (bu_file_exists(bu_vls_cstr(&vpid), NULL)) {
|
||||
bu_file_delete(bu_vls_cstr(&vp));
|
||||
}
|
||||
}
|
||||
|
||||
/* look for a log file */
|
||||
bu_vls_trunc(&vp, 0);
|
||||
bu_vls_trunc(&vpid, 0);
|
||||
bu_vls_printf(&vp, "%s.log", base_filename);
|
||||
if (bu_file_exists(bu_vls_cstr(&vp), NULL)) {
|
||||
bu_vls_printf(&vpid, "%s-%d.log", base_filename, id);
|
||||
if (bu_file_exists(bu_vls_cstr(&vpid), NULL)) {
|
||||
bu_file_delete(bu_vls_cstr(&vp));
|
||||
}
|
||||
}
|
||||
|
||||
bu_vls_free(&vpid);
|
||||
bu_vls_free(&vp);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Local Variables:
|
||||
* tab-width: 8
|
||||
* mode: C
|
||||
* indent-tabs-mode: t
|
||||
* c-file-style: "stroustrup"
|
||||
* End:
|
||||
* ex: shiftwidth=4 tabstop=8
|
||||
*/
|
||||
@@ -1,97 +0,0 @@
|
||||
/* C O M P U T E . C
|
||||
* BRL-CAD
|
||||
*
|
||||
* Copyright (c) 2011-2026 United States Government as represented by
|
||||
* the U.S. Army Research Laboratory.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above
|
||||
* copyright notice, this list of conditions and the following
|
||||
* disclaimer in the documentation and/or other materials provided
|
||||
* with the distribution.
|
||||
*
|
||||
* 3. The name of the author may not be used to endorse or promote
|
||||
* products derived from this software without specific prior written
|
||||
* permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
|
||||
* OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
|
||||
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
|
||||
* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
||||
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
/** @file compute.c
|
||||
*
|
||||
* run and computation functions
|
||||
*
|
||||
*/
|
||||
|
||||
#include "common.h"
|
||||
|
||||
|
||||
/**
|
||||
* average [..numbers..]
|
||||
*
|
||||
* computes the integer average for a set of given numbers
|
||||
*/
|
||||
double
|
||||
average(int ac, double av[])
|
||||
{
|
||||
double total = 0.0;
|
||||
int count = ac;
|
||||
|
||||
if (ac < 1 || !av)
|
||||
return 0.0;
|
||||
|
||||
while (ac-- > 0) {
|
||||
total += av[ac];
|
||||
}
|
||||
return total / (double)count;
|
||||
}
|
||||
|
||||
|
||||
double
|
||||
variance(int ac, double av[])
|
||||
{
|
||||
double avg;
|
||||
double err = 0.0;
|
||||
double num = ac;
|
||||
|
||||
if (ac < 1 || !av)
|
||||
return 0.0;
|
||||
else if (ac == 1)
|
||||
return 0.0;
|
||||
|
||||
avg = average(ac, av);
|
||||
|
||||
/* compute variance numerator for the population */
|
||||
while (ac-- > 0) {
|
||||
err += (av[ac] - avg) * (av[ac] - avg);
|
||||
}
|
||||
|
||||
/* return the sample variance */
|
||||
return err / (num - 1.0);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Local Variables:
|
||||
* tab-width: 8
|
||||
* mode: C
|
||||
* indent-tabs-mode: t
|
||||
* c-file-style: "stroustrup"
|
||||
* End:
|
||||
* ex: shiftwidth=4 tabstop=8
|
||||
*/
|
||||
Executable
+198
@@ -0,0 +1,198 @@
|
||||
#!/bin/sh
|
||||
# L G T . S H
|
||||
# BRL-CAD
|
||||
#
|
||||
# Copyright (c) 2004-2013 United States Government as represented by
|
||||
# the U.S. Army Research Laboratory.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions
|
||||
# are met:
|
||||
#
|
||||
# 1. Redistributions of source code must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
#
|
||||
# 2. Redistributions in binary form must reproduce the above
|
||||
# copyright notice, this list of conditions and the following
|
||||
# disclaimer in the documentation and/or other materials provided
|
||||
# with the distribution.
|
||||
#
|
||||
# 3. The name of the author may not be used to endorse or promote
|
||||
# products derived from this software without specific prior written
|
||||
# permission.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
|
||||
# OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
|
||||
# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
|
||||
# GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
||||
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
#
|
||||
###
|
||||
# A Shell script to test LGT
|
||||
# @(#)$Header$ (BRL)
|
||||
|
||||
# Ensure /bin/sh
|
||||
export PATH || (echo "This isn't sh."; sh $0 $*; kill $$)
|
||||
path_to_lgt_sh=`dirname $0`
|
||||
|
||||
expected="$path_to_lgt_sh/../src/lgt/lgt"
|
||||
if ! test -f "$expected" ; then
|
||||
echo "Can't find LGT"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# force locale setting to C so things like date output as expected
|
||||
LC_ALL=C
|
||||
|
||||
LGT="$expected"
|
||||
DB="$path_to_lgt_sh/../db"
|
||||
|
||||
CMP="$path_to_lgt_sh/pixcmp"
|
||||
if test ! -f $CMP ; then
|
||||
cake pixcmp
|
||||
fi
|
||||
|
||||
# Alliant NFS hack
|
||||
if test x${MACHINE} = xfx ; then
|
||||
cp ${LGT} /tmp/lgt
|
||||
cp ${CMP} /tmp/pixcmp
|
||||
LGT=/tmp/lgt
|
||||
CMP=/tmp/pixcmp
|
||||
fi
|
||||
|
||||
# This test of LGT assumes a "live" framebuffer here.
|
||||
if test x$FB_FILE = x ; then
|
||||
echo "Environment variable FB_FILE must be set to a real framebuffer"
|
||||
echo "for this test of LGT to operate correctly."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Run the first set of tests
|
||||
|
||||
${LGT} ${DB}/lgt-test.g all.g << EOF
|
||||
# read light source data base
|
||||
v ../db/lgt-test.ldb
|
||||
# read material data base
|
||||
w ../db/lgt-test.mdb
|
||||
# force display window to be 512x512 pixels, should cause 8-to-1 zoom
|
||||
T 512
|
||||
# clear frame buffer
|
||||
E
|
||||
# set maximum bounces to 20
|
||||
K 20
|
||||
# turn hidden-line drawing off
|
||||
k 0
|
||||
# configure grid: 64 rays across
|
||||
G 64 0 0 0.0
|
||||
# turn perspective off
|
||||
p 0
|
||||
# change background to mauve
|
||||
b 111 66 66
|
||||
# read key frame
|
||||
j ../db/lgt-test.key
|
||||
# display view #3
|
||||
R
|
||||
# save image in file
|
||||
H lgt3a.pix
|
||||
# change frame buffer to disk file
|
||||
o lgt3b.pix
|
||||
# save a script of previous commands, to produce the "b" version.
|
||||
S script3
|
||||
# disable reading of key frame file
|
||||
j
|
||||
# change frame buffer back to default
|
||||
o
|
||||
# configure grid: 2.45 mm cells, centered about model origin, view size 225 mm
|
||||
G 2.45 1 1 225.0
|
||||
# change background to firebrick
|
||||
b 142 35 35
|
||||
# force frame buffer size to be 455 pixels across, should cause 4-to-1 zoom
|
||||
T 455
|
||||
# set automatic perspective at 0.25
|
||||
p 0.25
|
||||
# set anti-aliasing over-sampling factor to 2
|
||||
A 2
|
||||
# set maximum bounces to 20
|
||||
K 20
|
||||
# display view #1
|
||||
R
|
||||
# save image in file
|
||||
H lgt1a.pix
|
||||
# change frame buffer to disk file
|
||||
o lgt1b.pix
|
||||
# save a script
|
||||
S script1
|
||||
# change frame buffer back to default
|
||||
o
|
||||
# turn off anti-aliasing
|
||||
A 1
|
||||
# revert to auto-sizing of frame buffer
|
||||
T 0
|
||||
# set automatic perspective at 0.25
|
||||
p 0.25
|
||||
# select hidden-line drawing, reverse video
|
||||
k 2
|
||||
# configure grid: 128 rays across, centered at model RPP, view size 225mm
|
||||
G 128 0 0 225.0
|
||||
# display view #2
|
||||
R
|
||||
# save image in file
|
||||
H lgt2a.pix
|
||||
# change frame buffer to disk file
|
||||
o lgt2b.pix
|
||||
# save a script
|
||||
S script2
|
||||
# change frame buffer back to default
|
||||
o
|
||||
# bye
|
||||
q
|
||||
EOF
|
||||
if test $? = 0 ; then
|
||||
:
|
||||
else
|
||||
echo "Abnormal lgt exit"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Run the second set of tests. The scripts were created above.
|
||||
./script1 < /dev/null &&
|
||||
./script2 < /dev/null &&
|
||||
./script3 < /dev/null || { echo "Script test failed."; exit 1; }
|
||||
|
||||
FAIL=0
|
||||
for i in 1 2 3 ; do
|
||||
if ${CMP} "$path_to_lgt_sh/../pix/lgt${i}.pix" lgt${i}a.pix ; then
|
||||
:
|
||||
else
|
||||
echo "Test $i A failed."
|
||||
FAIL=1
|
||||
fi
|
||||
if ${CMP} "$path_to_lgt_sh/../pix/lgt${i}.pix" lgt${i}b.pix
|
||||
then
|
||||
:
|
||||
else
|
||||
echo "Test $i B failed."
|
||||
FAIL=1
|
||||
fi
|
||||
done
|
||||
if test "$FAIL" -eq 0 ; then
|
||||
echo "LGT Tested OK."
|
||||
exit 0
|
||||
fi
|
||||
echo "*** LGT does NOT work on this platform ***"
|
||||
exit 2
|
||||
|
||||
# Local Variables:
|
||||
# mode: sh
|
||||
# tab-width: 8
|
||||
# sh-indentation: 4
|
||||
# sh-basic-offset: 4
|
||||
# indent-tabs-mode: t
|
||||
# End:
|
||||
# ex: shiftwidth=4 tabstop=8
|
||||
+121
-316
@@ -1,7 +1,7 @@
|
||||
/* P I X C M P . C
|
||||
* BRL-CAD
|
||||
*
|
||||
* Copyright (c) 2004-2026 United States Government as represented by
|
||||
* Copyright (c) 2004-2013 United States Government as represented by
|
||||
* the U.S. Army Research Laboratory.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
@@ -31,85 +31,52 @@
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#ifdef HAVE_SYS_STAT_H
|
||||
# include <sys/stat.h>
|
||||
#ifdef HAVE_UNISTD_H
|
||||
# include <unistd.h>
|
||||
#endif
|
||||
#include "bio.h"
|
||||
|
||||
// TODO - replace with std::filesystem::is_fifo
|
||||
#ifndef S_ISFIFO
|
||||
# ifdef S_IFIFO
|
||||
# define S_ISFIFO(mode) (((mode) & S_IFMT) == S_IFIFO)
|
||||
# else
|
||||
# define S_ISFIFO(mode) (0)
|
||||
# endif
|
||||
#endif
|
||||
#include "bu.h"
|
||||
|
||||
#include <errno.h>
|
||||
#include "bu/app.h"
|
||||
#include "bu/getopt.h"
|
||||
#include "bu/log.h"
|
||||
#include "bu/file.h"
|
||||
#include "bu/str.h"
|
||||
|
||||
/* exit codes for argument processing errors */
|
||||
#define OPTS_ERROR 127
|
||||
#define FILE_ERROR 126
|
||||
|
||||
/* exit codes for normal operation */
|
||||
#define EXIT_OFF_BY_NONE 0
|
||||
#define EXIT_OFF_BY_ONE 1
|
||||
#define EXIT_OFF_BY_MANY 2
|
||||
|
||||
enum diff {
|
||||
MATCHING,
|
||||
OFF_BY_ONE,
|
||||
OFF_BY_MANY,
|
||||
MISSING
|
||||
};
|
||||
#define OFF_BY_NONE 0
|
||||
#define OFF_BY_ONE 1
|
||||
#define OFF_BY_MANY 2
|
||||
|
||||
|
||||
static void
|
||||
HIDDEN void
|
||||
usage(const char *name)
|
||||
{
|
||||
const char *unknown = "pixcmp";
|
||||
if (!name) {
|
||||
name = unknown;
|
||||
}
|
||||
|
||||
/* split to fit within ISO C90 max static string length < 509 chars */
|
||||
bu_log("Usage: %s [OPTIONS] FILE1 [FILE2 [SKIP1 [SKIP2]]]\n"
|
||||
"\n"
|
||||
" Compare two PIX files pixel by pixel (or byte by byte), optionally"
|
||||
" skipping initial pixels (or bytes) in one or both input files.\n"
|
||||
"\n", name);
|
||||
bu_log("Options:"
|
||||
" -b Iterate and print by bytes instead of by pixels.\n"
|
||||
" -s Print all that have the same matching values.\n"
|
||||
" -d Print all that have different values.\n"
|
||||
" -q Quiet. Suppress printing header and summary.\n"
|
||||
/* this must be split, ISO C90 has a max static string length of 509 */
|
||||
bu_log("Usage: %s [OPTIONS] FILE1 [FILE2 [SKIP1 [SKIP2]]]\n%s", name,
|
||||
"Compare two PIX image files pixel by pixel.\n\n"
|
||||
" -l List pixel numbers and values for all pixels that differ.\n"
|
||||
" -b Output and process by bytes instead of pixels.\n"
|
||||
" -i SKIP\n"
|
||||
" Discard initial SKIP pixels (or bytes w/ -b) in FILE1 and FILE2 input.\n"
|
||||
" -i SKIP1:SKIP2\n"
|
||||
" Skip initial SKIP1 pixels (or bytes w/ -b) in FILE1 and SKIP2 in FILE2.\n"
|
||||
" -n COUNT\n"
|
||||
" Compare COUNT pixels (or bytes w/ -b). Stops by default at EOF.\n"
|
||||
"\n");
|
||||
bu_log("If either FILE is `-' or is missing, then input is read from standard input.\n"
|
||||
"If FILE1 and FILE2 are both standard input, then values must be interleaved.\n"
|
||||
"If the `-b' option is used, SKIP and COUNT values are bytes instead of pixels.\n"
|
||||
"Pixel numbers and bytes are indexed linearly from one.\n"
|
||||
"\n");
|
||||
" Skip the first SKIP pixels of input (for FILE1 and FILE2)\n");
|
||||
bu_log(" -i SKIP1:SKIP2\n"
|
||||
" Skip the first SKIP1 pixels in FILE1 and SKIP2 pixels in FILE2.\n"
|
||||
" -s Silent output. Only return an exit status.\n\n"
|
||||
"If FILE is `-' or is missing, then input is read from standard input.\n"
|
||||
"If the `-b' option is used, SKIP values are bytes instead of pixels.\n"
|
||||
"Pixel numbers and bytes are indexed linearly from one.\n");
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
handle_range_opt(const char *arg, size_t *skip1, size_t *skip2)
|
||||
HIDDEN void
|
||||
handle_i_opt(const char *arg, off_t *skip1, off_t *skip2)
|
||||
{
|
||||
const char *endptr = arg;
|
||||
long val;
|
||||
|
||||
if ((arg == NULL) || ((skip1 == NULL) && (skip2 == NULL))) {
|
||||
/* nothing to do */
|
||||
return;
|
||||
@@ -121,14 +88,12 @@ handle_range_opt(const char *arg, size_t *skip1, size_t *skip2)
|
||||
/* probably empty string */
|
||||
if (skip2) {
|
||||
endptr++;
|
||||
val = strtol(endptr, NULL, 10);
|
||||
*skip2 = (val < 0) ? 0 : val;
|
||||
*skip2 = strtol(endptr, NULL, 10);
|
||||
}
|
||||
} else if ((endptr == NULL) || (endptr[0] == '\0')) {
|
||||
/* no : found */
|
||||
if (skip2) {
|
||||
val = strtol(arg, NULL, 10);
|
||||
*skip2 = (val < 0) ? 0 : val;
|
||||
*skip2 = strtol(arg, NULL, 10);
|
||||
}
|
||||
if (skip1 && skip2) {
|
||||
*skip1 = *skip2;
|
||||
@@ -136,13 +101,11 @@ handle_range_opt(const char *arg, size_t *skip1, size_t *skip2)
|
||||
} else if (endptr[0] == ':') {
|
||||
/* found : */
|
||||
if (skip1) {
|
||||
val = strtol(arg, NULL, 10);
|
||||
*skip1 = (val < 0) ? 0 : val;
|
||||
*skip1 = strtol(arg, NULL, 10);
|
||||
}
|
||||
if (skip2) {
|
||||
endptr++; /* skip over : */
|
||||
val = strtol(endptr, NULL, 10);
|
||||
*skip2 = (val < 0) ? 0 : val;
|
||||
*skip2 = strtol(endptr, NULL, 10);
|
||||
}
|
||||
} else {
|
||||
bu_exit(OPTS_ERROR, "Unexpected input processing [%s]\n", arg);
|
||||
@@ -150,116 +113,43 @@ handle_range_opt(const char *arg, size_t *skip1, size_t *skip2)
|
||||
}
|
||||
|
||||
|
||||
static enum diff
|
||||
compare_rgb(int r1, int g1, int b1, int r2, int g2, int b2, size_t *matching, size_t *off1, size_t *offmany, size_t *missing)
|
||||
{
|
||||
enum diff result = MISSING;
|
||||
|
||||
if ((r1 == r2 && r1 != -1)
|
||||
&& (g1 == g2 && g1 != -1)
|
||||
&& (b1 == b2 && b1 != -1))
|
||||
{
|
||||
result = MATCHING;
|
||||
} else if (r1 == -1 || r2 == -1 || g1 == -1 || g2 == -1 || b1 == -1 || b2 == -1) {
|
||||
/* image sizes don't match (or other I/O error) */
|
||||
result = MISSING;
|
||||
} else {
|
||||
/* at least this */
|
||||
result = OFF_BY_ONE;
|
||||
|
||||
/* but maybe more */
|
||||
if (r1 != r2) {
|
||||
if ((r1 > r2 ? r1 - r2 : r2 - r1) > 1) {
|
||||
result = OFF_BY_MANY;
|
||||
}
|
||||
}
|
||||
if (g1 != g2) {
|
||||
if ((g1 > g2 ? g1 - g2 : g2 - g1) > 1) {
|
||||
result = OFF_BY_MANY;
|
||||
}
|
||||
}
|
||||
if (b1 != b2) {
|
||||
if ((b1 > b2 ? b1 - b2 : b2 - b1) > 1) {
|
||||
result = OFF_BY_MANY;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (result == OFF_BY_ONE) {
|
||||
(*off1)++;
|
||||
} else if (result == OFF_BY_MANY) {
|
||||
(*offmany)++;
|
||||
} else if (result == MATCHING) {
|
||||
(*matching)++;
|
||||
} else {
|
||||
(*missing)++;
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
main(int argc, char *argv[])
|
||||
{
|
||||
const char *argv0 = (argc > 0 && argv && argv[0]) ? argv[0] : "pixcmp";
|
||||
|
||||
FILE *f1 = NULL;
|
||||
FILE *f2 = NULL;
|
||||
struct stat sf1;
|
||||
struct stat sf2;
|
||||
|
||||
memset(&sf1, 0, sizeof(struct stat));
|
||||
memset(&sf2, 0, sizeof(struct stat));
|
||||
|
||||
size_t matching = 0;
|
||||
size_t off1 = 0;
|
||||
size_t offmany = 0;
|
||||
size_t missing = 0;
|
||||
long matching = 0;
|
||||
long off1 = 0;
|
||||
long offmany = 0;
|
||||
|
||||
int c;
|
||||
int list_diff = 0;
|
||||
int list_same = 0;
|
||||
int list_pixel_values = 0;
|
||||
int print_bytes = 0;
|
||||
int quiet = 0;
|
||||
int silent = 0;
|
||||
off_t f1_skip = 0;
|
||||
off_t f2_skip = 0;
|
||||
|
||||
size_t bytes = 0;
|
||||
size_t f1_skip = 0;
|
||||
size_t f2_skip = 0;
|
||||
size_t stop_after = 0;
|
||||
|
||||
if (argc > 0 && argv && argv[0]) {
|
||||
bu_setprogname(argv[0]);
|
||||
}
|
||||
long int bytes = 0;
|
||||
|
||||
/* process opts */
|
||||
while ((c = bu_getopt(argc, argv, "sdbi:n:q?")) != -1) {
|
||||
while ((c = bu_getopt(argc, argv, "lbi:s")) != -1) {
|
||||
switch (c) {
|
||||
case 's':
|
||||
list_same = 1;
|
||||
break;
|
||||
case 'd':
|
||||
list_diff = 1;
|
||||
case 'l':
|
||||
list_pixel_values = 1;
|
||||
break;
|
||||
case 'b':
|
||||
print_bytes = 1;
|
||||
break;
|
||||
case 'i':
|
||||
handle_range_opt(bu_optarg, &f1_skip, &f2_skip);
|
||||
handle_i_opt(bu_optarg, &f1_skip, &f2_skip);
|
||||
break;
|
||||
case 'n':
|
||||
{
|
||||
long num = strtol(bu_optarg, NULL, 10);
|
||||
stop_after = (num < 0) ? 0 : num;
|
||||
case 's':
|
||||
silent = 1;
|
||||
break;
|
||||
}
|
||||
case 'q':
|
||||
quiet = 1;
|
||||
break;
|
||||
case '?':
|
||||
case 'h':
|
||||
usage(argv0);
|
||||
return 0;
|
||||
default:
|
||||
bu_log("\n");
|
||||
usage(argv[0]);
|
||||
exit(OPTS_ERROR);
|
||||
}
|
||||
}
|
||||
@@ -269,17 +159,17 @@ main(int argc, char *argv[])
|
||||
/* validate what is left over */
|
||||
if (argc < 1 || argc > 4) {
|
||||
bu_log("ERROR: incorrect number of arguments provided\n\n");
|
||||
usage(argv0);
|
||||
usage(argv[0]);
|
||||
exit(OPTS_ERROR);
|
||||
}
|
||||
if ((argc > 0 && !argv[0]) || (argc > 1 && !argv[1])) {
|
||||
bu_log("ERROR: bad filename\n\n");
|
||||
usage(argv0);
|
||||
usage(argv[0]);
|
||||
exit(OPTS_ERROR);
|
||||
}
|
||||
if ((argc > 2 && !argv[2]) || (argc > 3 && !argv[3])) {
|
||||
bu_log("ERROR: bad skip value\n\n");
|
||||
usage(argv0);
|
||||
usage(argv[0]);
|
||||
exit(OPTS_ERROR);
|
||||
}
|
||||
|
||||
@@ -291,25 +181,10 @@ main(int argc, char *argv[])
|
||||
} else {
|
||||
snprintf(range, 64, "%s", argv[2]);
|
||||
}
|
||||
handle_range_opt(range, &f1_skip, &f2_skip);
|
||||
handle_i_opt(range, &f1_skip, &f2_skip);
|
||||
}
|
||||
|
||||
if (!print_bytes) {
|
||||
if ((f1_skip > ((size_t)-1)/3)
|
||||
|| (f2_skip > ((size_t)-1)/3))
|
||||
{
|
||||
bu_log("ERROR: overflow, -i skip value(s) are too big {%zu:%zu}\n", f1_skip, f2_skip);
|
||||
exit(OPTS_ERROR);
|
||||
}
|
||||
f1_skip *= 3;
|
||||
f2_skip *= 3;
|
||||
if (stop_after > ((size_t)-1)/3)
|
||||
{
|
||||
bu_log("ERROR: overflow, -n number is too big {%zu}\n", stop_after);
|
||||
exit(OPTS_ERROR);
|
||||
}
|
||||
stop_after *= 3;
|
||||
}
|
||||
/* printf("Skip from FILE1: %ld and from FILE2: %ld\n", f1_skip, f2_skip); */
|
||||
|
||||
if (BU_STR_EQUAL(argv[0], "-")) {
|
||||
f1 = stdin;
|
||||
@@ -317,183 +192,108 @@ main(int argc, char *argv[])
|
||||
perror(argv[0]);
|
||||
exit(FILE_ERROR);
|
||||
}
|
||||
|
||||
if ((argc < 2) || BU_STR_EQUAL(argv[1], "-")) {
|
||||
f2 = stdin;
|
||||
} else if ((f2 = fopen(argv[1], "rb")) == NULL) {
|
||||
perror(argv[1]);
|
||||
if (f1 != stdin)
|
||||
fclose(f1);
|
||||
exit(FILE_ERROR);
|
||||
}
|
||||
|
||||
setmode(fileno(stdin), O_BINARY);
|
||||
/* we're writing out ascii */
|
||||
/* setmode(fileno(stdout), O_BINARY); */
|
||||
|
||||
if (f1_skip != f2_skip && f1 == stdin && f2 == stdin) {
|
||||
if (f1 != stdin) fclose(f1);
|
||||
if (f2 != stdin) fclose(f2);
|
||||
bu_exit(OPTS_ERROR, "ERROR: cannot skip the same input stream by different amounts\n");
|
||||
if (!print_bytes) {
|
||||
f1_skip *= 3;
|
||||
f2_skip *= 3;
|
||||
}
|
||||
|
||||
errno = 0;
|
||||
if (fstat(fileno(f1), &sf1)) {
|
||||
bu_log("Warning - f1 fstat failed: %s\n", strerror(errno));
|
||||
}
|
||||
errno = 0;
|
||||
if (fstat(fileno(f2), &sf2)) {
|
||||
bu_log("Warning - f2 fstat failed: %s\n", strerror(errno));
|
||||
}
|
||||
|
||||
/* bu_log("FILE1_size(%zu) FILE1_skip(%zu) FILE2_size(%zu) FILE2_skip(%zu)\n", (size_t)sf1.st_size, f1_skip, (size_t)sf2.st_size, f2_skip); */
|
||||
|
||||
{
|
||||
size_t s1_eff = (sf1.st_size > (off_t)f1_skip) ? ((size_t)sf1.st_size - f1_skip) : 0;
|
||||
size_t s2_eff = (sf2.st_size > (off_t)f2_skip) ? ((size_t)sf2.st_size - f2_skip) : 0;
|
||||
const char *f2_name = (argc > 1 ? argv[1] : "-");
|
||||
|
||||
if (!quiet && (s1_eff != s2_eff)) {
|
||||
bu_log("WARNING: Different image sizes detected\n");
|
||||
if (print_bytes) {
|
||||
bu_log("\t%s: %7zu bytes (%8zu bytes, skipping %7zu)\n",
|
||||
argv[0], s1_eff, (size_t)sf1.st_size, f1_skip);
|
||||
bu_log("\t%s: %7zu bytes (%8zu bytes, skipping %7zu)\n",
|
||||
f2_name, s2_eff, (size_t)sf2.st_size, f2_skip);
|
||||
} else {
|
||||
bu_log("\t%s: %7zu pixels (%8zu bytes, skipping %7zu)\n",
|
||||
argv[0], s1_eff/3, (size_t)sf1.st_size, f1_skip);
|
||||
bu_log("\t%s: %7zu pixels (%8zu bytes, skipping %7zu)\n",
|
||||
f2_name, s2_eff/3, (size_t)sf2.st_size, f2_skip);
|
||||
}
|
||||
}
|
||||
|
||||
/* make sure we read all bytes */
|
||||
if (stop_after == 0) {
|
||||
stop_after = FMAX(s1_eff, s2_eff);
|
||||
if (f1 == stdin && f2 == stdin) {
|
||||
/* dual stdin is interleaved */
|
||||
stop_after = (stop_after+1)/2;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
bu_log("mode is [%d] and [%d]\n", S_ISFIFO(sf1.st_mode), S_ISFIFO(sf2.st_mode));
|
||||
bu_log("tty is [%d] and [%d]\n", isatty(fileno(f1)), isatty(fileno(f2)));
|
||||
*/
|
||||
|
||||
/* skip requested pixels/bytes in FILE1 */
|
||||
if (f1_skip) {
|
||||
if (S_ISFIFO(sf1.st_mode)) {
|
||||
size_t skipped = 0;
|
||||
for (skipped = 0; skipped < f1_skip; skipped++) {
|
||||
(void)fgetc(f1);
|
||||
}
|
||||
} else if (fseek(f1, (long)f1_skip, SEEK_SET)) {
|
||||
bu_log("ERROR: Unable to seek %zd %s%s in FILE1\n",
|
||||
f1_skip,
|
||||
print_bytes?"byte":"pixel",
|
||||
f1_skip==1?"":"s");
|
||||
perror("FILE1 fseek failure");
|
||||
exit(FILE_ERROR);
|
||||
}
|
||||
if (f1_skip && bu_fseek(f1, f1_skip, SEEK_SET)) {
|
||||
bu_log("ERROR: Unable to seek %zd %s%s in FILE1\n",
|
||||
f1_skip,
|
||||
print_bytes?"byte":"pixel",
|
||||
f1_skip==1?"":"s");
|
||||
perror("FILE1 fseek failure");
|
||||
exit(FILE_ERROR);
|
||||
}
|
||||
|
||||
/* skip requested pixels in FILE2 */
|
||||
if (f2_skip) {
|
||||
if (S_ISFIFO(sf2.st_mode)) {
|
||||
size_t skipped = 0;
|
||||
for (skipped = 0; skipped < f2_skip; skipped++) {
|
||||
(void)fgetc(f2);
|
||||
}
|
||||
} else if (fseek(f2, (long)f2_skip, SEEK_SET)) {
|
||||
bu_log("ERROR: Unable to seek %zd %s%s in FILE2\n",
|
||||
f2_skip,
|
||||
print_bytes?"byte":"pixel",
|
||||
f2_skip==1?"":"s");
|
||||
perror("FILE2 fseek failure");
|
||||
exit(FILE_ERROR);
|
||||
}
|
||||
}
|
||||
|
||||
/* print header to stderr, output to stdout */
|
||||
if (!quiet && (list_same || list_diff)) {
|
||||
if (print_bytes) {
|
||||
bu_log("#Byte FILE1 FILE2 LABEL\n");
|
||||
} else {
|
||||
bu_log("#Pixel\t(FILE1 R, G, B) (FILE2 R, G, B)\n");
|
||||
}
|
||||
if (f2_skip && bu_fseek(f2, f2_skip, SEEK_SET)) {
|
||||
bu_log("ERROR: Unable to seek %zd %s%s in FILE2\n",
|
||||
f1_skip,
|
||||
print_bytes?"byte":"pixel",
|
||||
f1_skip==1?"":"s");
|
||||
perror("FILE2 fseek failure");
|
||||
exit(FILE_ERROR);
|
||||
}
|
||||
|
||||
/* iterate over the pixels/bytes in the files */
|
||||
while (bytes < stop_after) {
|
||||
enum diff result;
|
||||
int r1 = -1;
|
||||
int r2 = -1;
|
||||
int g1 = -1;
|
||||
int g2 = -1;
|
||||
int b1 = -1;
|
||||
int b2 = -1;
|
||||
|
||||
/* bu_log("\tbytes[%zu] < stop[%zu\n", bytes, stop_after); */
|
||||
while ((!feof(f1) && !feof(f2)) &&
|
||||
(!ferror(f1) && !ferror(f2))) {
|
||||
register int r1, r2, g1, g2, b1, b2;
|
||||
r1 = r2 = g1 = g2 = b1 = b2 = -1;
|
||||
|
||||
r1 = fgetc(f1);
|
||||
r2 = fgetc(f2);
|
||||
if (feof(f1) || feof(f2)) break;
|
||||
bytes++;
|
||||
|
||||
if (print_bytes) {
|
||||
/* replicate */
|
||||
b1 = g1 = 0;
|
||||
b2 = g2 = 0;
|
||||
} else {
|
||||
if (!print_bytes) {
|
||||
g1 = fgetc(f1);
|
||||
g2 = fgetc(f2);
|
||||
if (feof(f1) || feof(f2)) break;
|
||||
bytes++;
|
||||
b1 = fgetc(f1);
|
||||
b2 = fgetc(f2);
|
||||
if (feof(f1) || feof(f2)) break;
|
||||
bytes++;
|
||||
}
|
||||
|
||||
result = compare_rgb(r1, g1, b1, r2, g2, b2, &matching, &off1, &offmany, &missing);
|
||||
if ((r1 == r2) && (g1 == g2) && (b1 == b2)) {
|
||||
matching++;
|
||||
continue;
|
||||
}
|
||||
|
||||
/* print them? */
|
||||
if ((result==MATCHING && list_same)
|
||||
|| (result!=MATCHING && list_diff))
|
||||
{
|
||||
const char *label = NULL;
|
||||
switch (result) {
|
||||
case MATCHING:
|
||||
label = "MATCHING";
|
||||
break;
|
||||
case OFF_BY_MANY:
|
||||
label = "OFF_BY_MANY";
|
||||
break;
|
||||
case OFF_BY_ONE:
|
||||
label = "OFF_BY_ONE";
|
||||
break;
|
||||
case MISSING:
|
||||
default:
|
||||
label = "MISSING";
|
||||
break;
|
||||
/* tabulate differing pixels */
|
||||
if (((r1 != r2) && (g1 == g2) && (b1 == b2)) ||
|
||||
((r1 == r2) && (g1 != g2) && (b1 == b2)) ||
|
||||
((r1 == r2) && (g1 == g2) && (b1 != b2))) {
|
||||
/* off by one channel */
|
||||
if (r1 != r2) {
|
||||
if ((r1 > r2 ? r1 - r2 : r2 - r1) > 1) {
|
||||
offmany++;
|
||||
} else {
|
||||
off1++;
|
||||
}
|
||||
} else if (g1 != g2) {
|
||||
if ((g1 > g2 ? g1 - g2 : g2 - g1) > 1) {
|
||||
offmany++;
|
||||
} else {
|
||||
off1++;
|
||||
}
|
||||
} else if (b1 != b2) {
|
||||
if ((b1 > b2 ? b1 - b2 : b2 - b1) > 1) {
|
||||
offmany++;
|
||||
} else {
|
||||
off1++;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
/* off by many */
|
||||
offmany++;
|
||||
}
|
||||
|
||||
/* they're different, so print something */
|
||||
if (list_pixel_values) {
|
||||
if (print_bytes) {
|
||||
printf("%zu %3d %3d %s\n", bytes, r1, r2, label);
|
||||
printf("%ld %3d %3d\n", bytes, r1, r2);
|
||||
} else {
|
||||
printf("%zu\t(%3d, %3d, %3d)\t(%3d, %3d, %3d) %s\n", bytes / 3, r1, g1, b1, r2, g2, b2, label);
|
||||
printf("%ld\t(%3d, %3d, %3d)\t(%3d, %3d, %3d)\n", bytes / 3, r1, g1, b1, r2, g2, b2);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* print summary */
|
||||
if (!quiet) {
|
||||
printf("pixcmp %s: %8zd matching, %8zd off by 1, %8zd off by many",
|
||||
print_bytes?"bytes":"pixels", matching, off1, offmany);
|
||||
if (missing) {
|
||||
printf(", %8zd missing\n", missing);
|
||||
} else {
|
||||
printf("\n");
|
||||
}
|
||||
if (!silent) {
|
||||
printf("pixcmp %s: %8ld matching, %8ld off by 1, %8ld off by many\n",
|
||||
print_bytes?"bytes":"pixels",
|
||||
matching, off1, offmany);
|
||||
}
|
||||
|
||||
/* check for errors */
|
||||
@@ -502,16 +302,21 @@ main(int argc, char *argv[])
|
||||
return FILE_ERROR;
|
||||
}
|
||||
|
||||
/* if files were of different lengths, consider it an error */
|
||||
if (feof(f1) != feof(f2)) {
|
||||
return FILE_ERROR;
|
||||
}
|
||||
|
||||
/* indicate how many differences there were overall */
|
||||
if (offmany || missing) {
|
||||
return EXIT_OFF_BY_MANY;
|
||||
if (offmany) {
|
||||
return OFF_BY_MANY;
|
||||
}
|
||||
if (off1) {
|
||||
return EXIT_OFF_BY_ONE;
|
||||
return OFF_BY_ONE;
|
||||
}
|
||||
|
||||
/* Success! */
|
||||
return EXIT_OFF_BY_NONE;
|
||||
return OFF_BY_NONE;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -1,80 +0,0 @@
|
||||
# Exercise pixcmp's pixel tolerance and exit-status contract with small,
|
||||
# deliberately readable byte streams.
|
||||
|
||||
if(NOT PIXCMP OR NOT TEST_DIR)
|
||||
message(FATAL_ERROR "PIXCMP and TEST_DIR are required")
|
||||
endif()
|
||||
|
||||
function(check_pixcmp name input1 input2 expected_status expected_summary)
|
||||
set(file1 "${TEST_DIR}/pixcmp_${name}_1.pix")
|
||||
set(file2 "${TEST_DIR}/pixcmp_${name}_2.pix")
|
||||
|
||||
file(WRITE "${file1}" "${input1}")
|
||||
file(WRITE "${file2}" "${input2}")
|
||||
|
||||
execute_process(
|
||||
COMMAND "${PIXCMP}" ${ARGN} "${file1}" "${file2}"
|
||||
OUTPUT_VARIABLE output
|
||||
ERROR_VARIABLE errors
|
||||
RESULT_VARIABLE status
|
||||
)
|
||||
|
||||
file(REMOVE "${file1}" "${file2}")
|
||||
|
||||
if(NOT "${status}" STREQUAL "${expected_status}")
|
||||
message(
|
||||
FATAL_ERROR
|
||||
"${name}: pixcmp returned ${status}, expected ${expected_status}\nstdout: ${output}\nstderr: ${errors}"
|
||||
)
|
||||
endif()
|
||||
|
||||
string(REGEX REPLACE "[ \t\r\n]+" " " normalized_output "${output}")
|
||||
string(STRIP "${normalized_output}" normalized_output)
|
||||
string(FIND "${normalized_output}" "${expected_summary}" summary_position)
|
||||
if(summary_position EQUAL -1)
|
||||
message(
|
||||
FATAL_ERROR
|
||||
"${name}: expected summary '${expected_summary}'\nactual stdout: ${output}\nstderr: ${errors}"
|
||||
)
|
||||
endif()
|
||||
endfunction()
|
||||
|
||||
set(exact_pixel "pixcmp pixels: 1 matching, 0 off by 1, 0 off by many")
|
||||
set(tolerated_pixel "pixcmp pixels: 0 matching, 1 off by 1, 0 off by many")
|
||||
set(rejected_pixel "pixcmp pixels: 0 matching, 0 off by 1, 1 off by many")
|
||||
|
||||
check_pixcmp(exact "ABC" "ABC" 0 "${exact_pixel}")
|
||||
check_pixcmp(one_channel_within_tolerance "ABC" "BBC" 1 "${tolerated_pixel}")
|
||||
check_pixcmp(two_channels_within_tolerance "ABC" "BCC" 1 "${tolerated_pixel}")
|
||||
check_pixcmp(three_channels_within_tolerance "ABC" "@CB" 1 "${tolerated_pixel}")
|
||||
|
||||
# Keep the tolerated channel first in two cases to catch short-circuiting that
|
||||
# would fail to inspect a later channel outside the tolerance.
|
||||
check_pixcmp(red_outside_tolerance "ABC" "CCD" 2 "${rejected_pixel}")
|
||||
check_pixcmp(green_outside_tolerance "ABC" "BDD" 2 "${rejected_pixel}")
|
||||
check_pixcmp(blue_outside_tolerance "ABC" "BCE" 2 "${rejected_pixel}")
|
||||
|
||||
check_pixcmp(
|
||||
missing_pixel
|
||||
"ABC"
|
||||
"ABCDEF"
|
||||
2
|
||||
"pixcmp pixels: 1 matching, 0 off by 1, 0 off by many, 1 missing"
|
||||
)
|
||||
|
||||
check_pixcmp(
|
||||
byte_within_tolerance
|
||||
"A"
|
||||
"B"
|
||||
1
|
||||
"pixcmp bytes: 0 matching, 1 off by 1, 0 off by many"
|
||||
-b
|
||||
)
|
||||
check_pixcmp(
|
||||
byte_outside_tolerance
|
||||
"A"
|
||||
"C"
|
||||
2
|
||||
"pixcmp bytes: 0 matching, 0 off by 1, 1 off by many"
|
||||
-b
|
||||
)
|
||||
@@ -1,29 +1,27 @@
|
||||
set(
|
||||
BENCHMARK_PIX
|
||||
set(BENCHMARK_PIX
|
||||
bldg391.pix
|
||||
m35.pix
|
||||
moss.pix
|
||||
sphflake.pix
|
||||
star.pix
|
||||
world.pix
|
||||
)
|
||||
)
|
||||
|
||||
set(
|
||||
PIX_LOG
|
||||
|
||||
set(PIX_LOG
|
||||
bldg391.log
|
||||
m35.log
|
||||
moss.log
|
||||
sphflake.log
|
||||
star.log
|
||||
world.log
|
||||
)
|
||||
)
|
||||
|
||||
brlcad_adddata(BENCHMARK_PIX pix)
|
||||
brlcad_adddata(PIX_LOG pix)
|
||||
BRLCAD_ADDDATA(BENCHMARK_PIX pix)
|
||||
BRLCAD_ADDDATA(PIX_LOG pix)
|
||||
|
||||
cmakefiles(${BENCHMARK_PIX})
|
||||
cmakefiles(${PIX_LOG})
|
||||
cmakefiles(CMakeLists.txt)
|
||||
CMAKEFILES(${BENCHMARK_PIX})
|
||||
CMAKEFILES(${PIX_LOG})
|
||||
|
||||
# Local Variables:
|
||||
# tab-width: 8
|
||||
|
||||
-125
@@ -1,125 +0,0 @@
|
||||
/* R U N . C
|
||||
* BRL-CAD
|
||||
*
|
||||
* Copyright (c) 2011-2026 United States Government as represented by
|
||||
* the U.S. Army Research Laboratory.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above
|
||||
* copyright notice, this list of conditions and the following
|
||||
* disclaimer in the documentation and/or other materials provided
|
||||
* with the distribution.
|
||||
*
|
||||
* 3. The name of the author may not be used to endorse or promote
|
||||
* products derived from this software without specific prior written
|
||||
* permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
|
||||
* OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
|
||||
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
|
||||
* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
||||
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
/** @file run.c
|
||||
*
|
||||
* run functions
|
||||
*
|
||||
*/
|
||||
|
||||
#include "common.h"
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "bu.h"
|
||||
|
||||
|
||||
/* TODO: !!! obviously */
|
||||
struct bu_vls bu_argv_to_string(int ac, const char *av[]) {struct bu_vls v = BU_VLS_INIT_ZERO; if (ac) {bu_vls_printf(&v, "%s", av[0]);} return v;}
|
||||
int (*echo)(const char *, ...) = &bu_log;
|
||||
extern int bu_exec(const char *program, void *data, struct bu_vls *out, struct bu_vls *err);
|
||||
|
||||
|
||||
/**
|
||||
* run file_prefix geometry hypersample [..rt args..]
|
||||
* runs a single benchmark test assuming the following are preset:
|
||||
*
|
||||
* RT := path/name of the raytracer to use
|
||||
* DB := path to the geometry file
|
||||
*
|
||||
* it is assumed that stdin will be the view/frame input
|
||||
*/
|
||||
int
|
||||
run(int ac, char *av[])
|
||||
{
|
||||
int retval;
|
||||
const char *run_geomname;
|
||||
const char *run_geometry;
|
||||
const char *run_target;
|
||||
long int hypersample;
|
||||
|
||||
if (ac < 3 || !av || !av[0] || !av[1] || !av[2])
|
||||
return -1;
|
||||
|
||||
run_geomname = av[0];
|
||||
run_geometry = av[1];
|
||||
hypersample = strtol(av[2], NULL, 10);
|
||||
av += 3;
|
||||
ac -= 3;
|
||||
|
||||
run_target = (ac > 0 && av && av[0]) ? av[0] : "";
|
||||
|
||||
{
|
||||
struct bu_vls args = bu_argv_to_string(ac, (const char **)av);
|
||||
echo("DEBUG: Running %s -B -M -s512 -H%ld -J0 %s -o %s.pix %s/%s.g %s\n",
|
||||
run_target, hypersample, bu_vls_cstr(&args), run_geomname, run_geomname, run_geometry);
|
||||
bu_vls_free(&args);
|
||||
}
|
||||
|
||||
/* pipe(stdin_for_bu_exec); */
|
||||
retval = bu_exec("program", NULL, NULL, NULL);
|
||||
echo("DEBUG: Running %s returned %d\n", run_target, retval);
|
||||
|
||||
return retval;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* runs a series of benchmark tests assuming the following are preset:
|
||||
*
|
||||
* TIMEFRAME := maximum amount of wallclock time to spend per test
|
||||
*
|
||||
* is is assumed that stdin will be the view/frame input
|
||||
*/
|
||||
int
|
||||
bench(const char *test_name)
|
||||
{
|
||||
if (!test_name)
|
||||
return -1;
|
||||
|
||||
/* FIXME: !!! lots missing here */
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Local Variables:
|
||||
* tab-width: 8
|
||||
* mode: C
|
||||
* indent-tabs-mode: t
|
||||
* c-file-style: "stroustrup"
|
||||
* End:
|
||||
* ex: shiftwidth=4 tabstop=8
|
||||
*/
|
||||
+139
-189
@@ -2,7 +2,7 @@
|
||||
# R U N . S H
|
||||
# BRL-CAD
|
||||
#
|
||||
# Copyright (c) 2004-2026 United States Government as represented by
|
||||
# Copyright (c) 2004-2013 United States Government as represented by
|
||||
# the U.S. Army Research Laboratory.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
@@ -51,7 +51,7 @@
|
||||
export PATH || (echo "This isn't sh."; sh $0 $*; kill $$)
|
||||
|
||||
# save the precious args
|
||||
ARGS="$@"
|
||||
ARGS="$*"
|
||||
NAME_OF_THIS="`basename \"$0\"`"
|
||||
PATH_TO_THIS="`dirname \"$0\"`"
|
||||
THIS="$PATH_TO_THIS/$NAME_OF_THIS"
|
||||
@@ -70,29 +70,25 @@ LC_ALL=C
|
||||
|
||||
# commands that this script expects
|
||||
for __cmd in echo pwd ; do
|
||||
out=`echo "test" | $__cmd 2>&1`
|
||||
echo "test" | $__cmd > /dev/null 2>&1
|
||||
if test ! x$? = x0 ; then
|
||||
echo "INTERNAL ERROR: $__cmd command is required"
|
||||
echo " (output was [$out])"
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
out=`echo "test" | grep "test" 2>&1`
|
||||
echo "test" | grep "test" > /dev/null 2>&1
|
||||
if test ! x$? = x0 ; then
|
||||
echo "INTERNAL ERROR: grep command is required"
|
||||
echo " (output was [$out])"
|
||||
exit 1
|
||||
fi
|
||||
out=`echo "test" | tr "test" "test" 2>&1`
|
||||
echo "test" | tr "test" "test" > /dev/null 2>&1
|
||||
if test ! x$? = x0 ; then
|
||||
echo "INTERNAL ERROR: tr command is required"
|
||||
echo " (output was [$out])"
|
||||
exit 1
|
||||
fi
|
||||
out=`echo "test" | sed "s/test/test/" 2>&1`
|
||||
echo "test" | sed "s/test/test/" > /dev/null 2>&1
|
||||
if test ! x$? = x0 ; then
|
||||
echo "INTERNAL ERROR: sed command is required"
|
||||
echo " (output was [$out])"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
@@ -105,13 +101,6 @@ case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
|
||||
*) ECHO_N= ECHO_C='\c' ECHO_T= ;;
|
||||
esac
|
||||
|
||||
# Use a local cache
|
||||
BU_DIR_CACHE="`pwd`/cache-$$-benchmark"
|
||||
rm -rf $BU_DIR_CACHE && mkdir $BU_DIR_CACHE
|
||||
export BU_DIR_CACHE
|
||||
LIBRT_CACHE="`pwd`/rtcache-$$-benchmark"
|
||||
rm -rf $LIBRT_CACHE && mkdir $LIBRT_CACHE
|
||||
export LIBRT_CACHE
|
||||
|
||||
#######################
|
||||
# log to tty and file #
|
||||
@@ -170,59 +159,66 @@ booleanize ( ) {
|
||||
}
|
||||
|
||||
|
||||
# any unrecognized args are assumed to be RT args (e.g., -P4)
|
||||
RTARGS=""
|
||||
|
||||
# process the argument list for commands
|
||||
while test $# -gt 0 ; do
|
||||
|
||||
arg="$1"
|
||||
shift
|
||||
|
||||
NEWARGS=""
|
||||
for arg in $ARGS ; do
|
||||
case "x$arg" in
|
||||
x*[cC][lL][eE][aA][nN])
|
||||
CLEAN=1
|
||||
shift
|
||||
;;
|
||||
x*[cC][lL][oO][bB][bB][eE][rR])
|
||||
CLEAN=1
|
||||
CLOBBER=1
|
||||
shift
|
||||
;;
|
||||
x*[hH])
|
||||
HELP=1
|
||||
shift
|
||||
;;
|
||||
x*[hH][eE][lL][pP])
|
||||
HELP=1
|
||||
shift
|
||||
;;
|
||||
x*[iI][nN][sS][tT][rR][uU][cC][tT]*)
|
||||
INSTRUCTIONS=1
|
||||
shift
|
||||
;;
|
||||
x*[sS][tT][aA][rR][tT])
|
||||
shift
|
||||
;;
|
||||
x*[qQ][uU][iI][eE][tT])
|
||||
QUIET=1
|
||||
shift
|
||||
;;
|
||||
x*[vV][eE][rR][bB][oO][sS][eE])
|
||||
VERBOSE=1
|
||||
shift
|
||||
;;
|
||||
x*[rR][uU][nN])
|
||||
RUN=1
|
||||
shift
|
||||
;;
|
||||
x*=*)
|
||||
VAR=`echo $arg | sed 's/=.*//g'`
|
||||
if test ! "x$VAR" = "x" ; then
|
||||
VAL=`echo $arg | sed 's/.*=//g'`
|
||||
CMD="$VAR=\"$VAL\""
|
||||
CMD="$VAR=$VAL"
|
||||
eval $CMD
|
||||
export $VAR
|
||||
fi
|
||||
shift
|
||||
;;
|
||||
x*)
|
||||
echo "WARNING: Passing unknown option [$arg] to RT"
|
||||
RTARGS="$RTARGS $arg"
|
||||
echo "WARNING: Passing unknown option [$1] to RT"
|
||||
NEWARGS="$NEWARGS $arg"
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
# reload post-shifting
|
||||
ARGS="$NEWARGS"
|
||||
|
||||
# validate and clean up options (all default to 0)
|
||||
booleanize CLOBBER HELP INSTRUCTIONS QUIET VERBOSE RUN
|
||||
|
||||
@@ -402,14 +398,12 @@ fi
|
||||
|
||||
# where to write results
|
||||
LOGFILE=run-$$-benchmark.log
|
||||
if test -e $LOGFILE ; then
|
||||
echo "WARNING: $LOGFILE already exists. Appending."
|
||||
else
|
||||
touch "$LOGFILE"
|
||||
fi
|
||||
touch "$LOGFILE"
|
||||
if test ! -w "$LOGFILE" ; then
|
||||
echo "WARNING: Unable to log to $LOGFILE"
|
||||
LOGFILE=
|
||||
if test ! "x$LOGFILE" = "x/dev/null" ; then
|
||||
echo "ERROR: Unable to log to $LOGFILE"
|
||||
fi
|
||||
LOGFILE=/dev/null
|
||||
fi
|
||||
|
||||
VERBOSE_ECHO=:
|
||||
@@ -428,13 +422,7 @@ fi
|
||||
$ECHO "B R L - C A D B E N C H M A R K"
|
||||
$ECHO "================================="
|
||||
$ECHO "Running $THIS on `date`"
|
||||
if test "x$LOGFILE" != "x" ; then
|
||||
$ECHO "Logging output to $LOGFILE"
|
||||
elif test "x$QUIET" != "x" ; then
|
||||
$ECHO "Logging output to STDOUT"
|
||||
else
|
||||
$ECHO "Logging output is OFF"
|
||||
fi
|
||||
$ECHO "Logging output to $LOGFILE"
|
||||
$ECHO "`uname -a 2>&1`"
|
||||
$ECHO
|
||||
|
||||
@@ -443,13 +431,13 @@ $ECHO
|
||||
########################
|
||||
look_for ( ) {
|
||||
|
||||
|
||||
# utility function to search for a certain filesystem object in a
|
||||
# list of paths.
|
||||
|
||||
look_for_type="$1" ; shift
|
||||
look_for_label="$1" ; shift
|
||||
look_for_var="$1" ; shift
|
||||
look_for_dirs="$*"
|
||||
|
||||
if test "x$look_for_label" != "x" ; then
|
||||
$VERBOSE_ECHO "Looking for $look_for_label"
|
||||
@@ -457,11 +445,11 @@ look_for ( ) {
|
||||
|
||||
# get the value of the variable
|
||||
look_for_var_var="echo \"\$$look_for_var\""
|
||||
look_for_var_val="`eval \"${look_for_var_var}\"`"
|
||||
look_for_var_val="`eval ${look_for_var_var}`"
|
||||
|
||||
if test "x${look_for_var_val}" = "x" ; then
|
||||
for look_for_dir in "$@" ; do
|
||||
shift
|
||||
for look_for_dir in $look_for_dirs ; do
|
||||
|
||||
opts="-r"
|
||||
case "x$look_for_type" in
|
||||
xfile)
|
||||
@@ -472,10 +460,10 @@ look_for ( ) {
|
||||
opts="-d -x"
|
||||
;;
|
||||
xexe*)
|
||||
opts="$opts -f -x"
|
||||
opts="$opts -f -r -x"
|
||||
;;
|
||||
xscr*)
|
||||
opts="$opts -f -x"
|
||||
opts="$opts -f -r -x"
|
||||
;;
|
||||
esac
|
||||
look_for_failed=no
|
||||
@@ -503,61 +491,61 @@ look_for ( ) {
|
||||
}
|
||||
|
||||
look_for executable "the BRL-CAD raytracer" RT \
|
||||
"${PATH_TO_THIS}/rt" \
|
||||
"${PATH_TO_THIS}/../bin/rt" \
|
||||
"${PATH_TO_THIS}/../src/rt/rt" \
|
||||
"${PATH_TO_THIS}/src/rt/rt" \
|
||||
${PATH_TO_THIS}/rt \
|
||||
${PATH_TO_THIS}/../bin/rt \
|
||||
${PATH_TO_THIS}/../src/rt/rt \
|
||||
${PATH_TO_THIS}/src/rt/rt \
|
||||
./rt \
|
||||
../brlcadInstall/bin/rt.exe \
|
||||
../src/rt/rt
|
||||
|
||||
look_for file "a benchmark geometry directory" DB \
|
||||
"${PATH_TO_THIS}/../share/brlcad/*.*.*/db/moss.g" \
|
||||
"${PATH_TO_THIS}/share/brlcad/*.*.*/db/moss.g" \
|
||||
"${PATH_TO_THIS}/../share/brlcad/db/moss.g" \
|
||||
"${PATH_TO_THIS}/share/brlcad/db/moss.g" \
|
||||
"${PATH_TO_THIS}/../share/db/moss.g" \
|
||||
"${PATH_TO_THIS}/share/db/moss.g" \
|
||||
"${PATH_TO_THIS}/../db/moss.g" \
|
||||
"${PATH_TO_THIS}/db/moss.g" \
|
||||
${PATH_TO_THIS}/../share/brlcad/*.*.*/db/moss.g \
|
||||
${PATH_TO_THIS}/share/brlcad/*.*.*/db/moss.g \
|
||||
${PATH_TO_THIS}/../share/brlcad/db/moss.g \
|
||||
${PATH_TO_THIS}/share/brlcad/db/moss.g \
|
||||
${PATH_TO_THIS}/../share/db/moss.g \
|
||||
${PATH_TO_THIS}/share/db/moss.g \
|
||||
${PATH_TO_THIS}/../db/moss.g \
|
||||
${PATH_TO_THIS}/db/moss.g \
|
||||
./db/moss.g \
|
||||
../brlcadInstall/share/brlcad/*.*.*/db/moss.g \
|
||||
../db/moss.g
|
||||
DB="`echo $DB | sed 's,/moss.g$,,'`"
|
||||
DB=`echo $DB | sed 's,/moss.g$,,'`
|
||||
|
||||
look_for directory "a benchmark reference image directory" PIX \
|
||||
"${PATH_TO_THIS}/../share/brlcad/*.*.*/pix" \
|
||||
"${PATH_TO_THIS}/share/brlcad/*.*.*/pix" \
|
||||
"${PATH_TO_THIS}/../share/brlcad/pix" \
|
||||
"${PATH_TO_THIS}/share/brlcad/pix" \
|
||||
"${PATH_TO_THIS}/../share/pix" \
|
||||
"${PATH_TO_THIS}/share/pix" \
|
||||
"${PATH_TO_THIS}/ref" \
|
||||
${PATH_TO_THIS}/../share/brlcad/*.*.*/pix \
|
||||
${PATH_TO_THIS}/share/brlcad/*.*.*/pix \
|
||||
${PATH_TO_THIS}/../share/brlcad/pix \
|
||||
${PATH_TO_THIS}/share/brlcad/pix \
|
||||
${PATH_TO_THIS}/../share/pix \
|
||||
${PATH_TO_THIS}/share/pix \
|
||||
${PATH_TO_THIS}/ref \
|
||||
./ref
|
||||
|
||||
look_for directory "a benchmark reference log directory" LOG \
|
||||
"$PIX" \
|
||||
"${PATH_TO_THIS}/../share/brlcad/*.*.*/pix" \
|
||||
"${PATH_TO_THIS}/share/brlcad/*.*.*/pix" \
|
||||
"${PATH_TO_THIS}/../share/brlcad/pix" \
|
||||
"${PATH_TO_THIS}/share/brlcad/pix" \
|
||||
"${PATH_TO_THIS}/../share/pix" \
|
||||
"${PATH_TO_THIS}/share/pix" \
|
||||
"${PATH_TO_THIS}/ref" \
|
||||
$PIX \
|
||||
${PATH_TO_THIS}/../share/brlcad/*.*.*/pix \
|
||||
${PATH_TO_THIS}/share/brlcad/*.*.*/pix \
|
||||
${PATH_TO_THIS}/../share/brlcad/pix \
|
||||
${PATH_TO_THIS}/share/brlcad/pix \
|
||||
${PATH_TO_THIS}/../share/pix \
|
||||
${PATH_TO_THIS}/share/pix \
|
||||
${PATH_TO_THIS}/ref \
|
||||
./ref
|
||||
|
||||
look_for executable "a pixel comparison utility" CMP \
|
||||
"${PATH_TO_THIS}/pixcmp" \
|
||||
"${PATH_TO_THIS}/../bin/pixcmp" \
|
||||
"${PATH_TO_THIS}/../bench/pixcmp" \
|
||||
${PATH_TO_THIS}/pixcmp \
|
||||
${PATH_TO_THIS}/../bin/pixcmp \
|
||||
${PATH_TO_THIS}/../bench/pixcmp \
|
||||
../brlcadInstall/bin/pixcmp.exe \
|
||||
./pixcmp
|
||||
|
||||
look_for script "a time elapsed utility" ELP \
|
||||
"${PATH_TO_THIS}/elapsed.sh" \
|
||||
"${PATH_TO_THIS}/../bin/elapsed.sh" \
|
||||
"${PATH_TO_THIS}/sh/elapsed.sh" \
|
||||
"${PATH_TO_THIS}/../sh/elapsed.sh" \
|
||||
${PATH_TO_THIS}/elapsed.sh \
|
||||
${PATH_TO_THIS}/../bin/elapsed.sh \
|
||||
${PATH_TO_THIS}/sh/elapsed.sh \
|
||||
${PATH_TO_THIS}/../sh/elapsed.sh \
|
||||
./elapsed.sh
|
||||
|
||||
|
||||
@@ -603,39 +591,31 @@ else
|
||||
$ECHO "Using [$ELP] for ELP"
|
||||
fi
|
||||
|
||||
# stop git shell & msys2 arg manipulation
|
||||
export MSYS_NO_PATHCONV=1 MSYS2_ARG_CONV_EXCL="-F/dev/debug"
|
||||
|
||||
# sanity check: make sure $RT runs
|
||||
out=`eval \"$RT\" -s1 -F/dev/debug \"${DB}/moss.g\" LIGHT 2>&1`
|
||||
# more sanity checks, make sure the binaries and scripts run
|
||||
$RT -s1 -F/dev/debug ${DB}/moss.g LIGHT > /dev/null 2>&1
|
||||
ret=$?
|
||||
if test ! "x${ret}" = "x0" ; then
|
||||
$ECHO
|
||||
$ECHO "Running \"$RT\":"
|
||||
"$RT"
|
||||
$ECHO
|
||||
$ECHO "ERROR: RT does not seem to work as expected"
|
||||
$ECHO " (returned $ret, output was [$out])"
|
||||
exit 2
|
||||
fi
|
||||
|
||||
# sanity check: make sure $CMP runs
|
||||
out=`eval \"$CMP\" - - 2>&1 <<EOF
|
||||
EOF`
|
||||
# create a temporary file named "null", fopen("/dev/null") does not work on
|
||||
# windows (using cygwin), so punt.
|
||||
> null
|
||||
$CMP null null >/dev/null 2>&1
|
||||
rm -f null
|
||||
|
||||
ret=$?
|
||||
if test ! "x${ret}" = "x0" ; then
|
||||
$ECHO
|
||||
$ECHO "ERROR: CMP does not seem to work as expected"
|
||||
$ECHO " (returned $ret, output was [$out])"
|
||||
exit 2
|
||||
fi
|
||||
|
||||
# sanity check: make sure $ELP runs
|
||||
out=`eval \"$ELP\" 0 2>&1`
|
||||
$ELP 0 > /dev/null 2>&1
|
||||
if test ! "x${ret}" = "x0" ; then
|
||||
$ECHO
|
||||
$ECHO "ERROR: ELP does not seem to work as expected"
|
||||
$ECHO " (returned $ret, output was [$out])"
|
||||
exit 2
|
||||
fi
|
||||
|
||||
@@ -695,18 +675,17 @@ $ECHO
|
||||
|
||||
|
||||
# if expr works, let the user know about how long this might take
|
||||
zero=`expr 1 - 1 2>&1`
|
||||
if test "x$zero" = "x0" ; then
|
||||
if test "x`expr 1 - 1 2>/dev/null`" = "x0" ; then
|
||||
mintime="`expr 6 \* $TIMEFRAME`"
|
||||
if test $mintime -lt 1 ; then
|
||||
mintime=0 # zero is okay
|
||||
fi
|
||||
$ECHO "Minimum run time is `\"$ELP\" $mintime`"
|
||||
$ECHO "Minimum run time is `$ELP $mintime`"
|
||||
maxtime="`expr 6 \* $MAXTIME`"
|
||||
if test $maxtime -lt 1 ; then
|
||||
maxtime=1 # zero would be misleading
|
||||
fi
|
||||
$ECHO "Maximum run time is `\"$ELP\" $maxtime`"
|
||||
$ECHO "Maximum run time is `$ELP $maxtime`"
|
||||
estimate="`expr 3 \* $mintime`"
|
||||
if test $estimate -lt 1 ; then
|
||||
estimate=1 # zero would be misleading
|
||||
@@ -714,11 +693,10 @@ if test "x$zero" = "x0" ; then
|
||||
if test $estimate -gt $maxtime ; then
|
||||
estimate="$maxtime"
|
||||
fi
|
||||
$ECHO "Estimated time is `eval \\\"$ELP\\\" $estimate`"
|
||||
$ECHO "Estimated time is `$ELP $estimate`"
|
||||
$ECHO
|
||||
else
|
||||
$ECHO "WARNING: expr is unavailable, unable to compute statistics"
|
||||
$ECHO " (output of 1 - 1 was [$zero])"
|
||||
$ECHO
|
||||
fi
|
||||
|
||||
@@ -745,14 +723,14 @@ run ( ) {
|
||||
|
||||
$VERBOSE_ECHO "DEBUG: Running $RT -B -M -s512 -H${run_hypersample} -J0 ${run_args} -o ${run_geomname}.pix ${DB}/${run_geomname}.g ${run_geometry}"
|
||||
|
||||
eval \"$RT\" -B -M -s512 -H${run_hypersample} -J0 ${run_args} \
|
||||
$RT -B -M -s512 -H${run_hypersample} -J0 ${run_args} \
|
||||
-o ${run_geomname}.pix \
|
||||
\"${DB}/${run_geomname}.g\" ${run_geometry} 1>&2 <<EOF
|
||||
${DB}/${run_geomname}.g ${run_geometry} 1>&2 <<EOF
|
||||
$run_view
|
||||
EOF
|
||||
run_retval=$?
|
||||
$VERBOSE_ECHO "DEBUG: Running $RT returned $run_retval"
|
||||
return $run_retval
|
||||
retval=$?
|
||||
$VERBOSE_ECHO "DEBUG: Running $RT returned $retval"
|
||||
return $retval
|
||||
}
|
||||
|
||||
|
||||
@@ -885,13 +863,13 @@ sqrt ( ) {
|
||||
if test "x$sqrt_number" = "x" ; then
|
||||
$ECHO "ERROR: cannot compute the square root of nothing" 1>&2
|
||||
exit 1
|
||||
elif test $sqrt_number -lt 0 ; then
|
||||
elif test $sqrt_number -lt 0 > /dev/null 2>&1 ; then
|
||||
$ECHO "ERROR: square root of negative numbers is only in your imagination" 1>&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
sqrt_have_dc=yes
|
||||
out=`echo "1 1 + p" | dc 2>&1`
|
||||
echo "1 1 + p" | dc >/dev/null 2>&1
|
||||
if test ! x$? = x0 ; then
|
||||
sqrt_have_dc=no
|
||||
fi
|
||||
@@ -901,7 +879,7 @@ sqrt ( ) {
|
||||
sqrt_root=`echo "$sqrt_number v p" | dc`
|
||||
else
|
||||
sqrt_have_bc=yes
|
||||
out=`echo "1 + 1" | bc 2>&1`
|
||||
echo "1 + 1" | bc >/dev/null 2>&1
|
||||
if test ! "x$?" = "x0" ; then
|
||||
sqrt_have_bc=no
|
||||
fi
|
||||
@@ -986,7 +964,6 @@ bench ( ) {
|
||||
bench_frame=0
|
||||
bench_rtfms=""
|
||||
bench_percent=100
|
||||
bench_retval=0
|
||||
bench_start_time="`date '+%H %M %S'`"
|
||||
bench_overall_elapsed=-1
|
||||
|
||||
@@ -1010,10 +987,7 @@ $bench_view
|
||||
start $bench_frame;
|
||||
end;
|
||||
EOF
|
||||
bench_raytrace_retval=$?
|
||||
if test $bench_raytrace_retval != 0 ; then
|
||||
bench_retval=$bench_raytrace_retval
|
||||
fi
|
||||
retval=$?
|
||||
|
||||
if test $bench_frame -ne 0 ; then
|
||||
if test -f ${bench_testname}.pix.$bench_frame ; then
|
||||
@@ -1025,7 +999,7 @@ EOF
|
||||
|
||||
# compute how long we took, rounding up to at least one
|
||||
# second to prevent division by zero.
|
||||
bench_elapsed="`eval \\\"$ELP\\\" --seconds $bench_frame_start_time`"
|
||||
bench_elapsed="`$ELP --seconds $bench_frame_start_time`"
|
||||
if test "x$bench_elapsed" = "x" ; then
|
||||
bench_elapsed=1
|
||||
fi
|
||||
@@ -1087,13 +1061,13 @@ EOF
|
||||
fi
|
||||
|
||||
# did we fail?
|
||||
if test $bench_raytrace_retval != 0 ; then
|
||||
if test $retval != 0 ; then
|
||||
$ECHO "RAYTRACE ERROR"
|
||||
break
|
||||
fi
|
||||
|
||||
# see if we need to break out early
|
||||
bench_overall_elapsed="`eval \\\"$ELP\\\" --seconds $bench_start_time`"
|
||||
bench_overall_elapsed="`$ELP --seconds $bench_start_time`"
|
||||
if test $bench_overall_elapsed -ge $MAXTIME ; then
|
||||
break;
|
||||
fi
|
||||
@@ -1131,7 +1105,7 @@ EOF
|
||||
break
|
||||
fi
|
||||
|
||||
bench_overall_elapsed="`eval \\\"$ELP\\\" --seconds $bench_start_time`"
|
||||
bench_overall_elapsed="`$ELP --seconds $bench_start_time`"
|
||||
|
||||
# undo the hypersample increase back one step
|
||||
bench_hypersample="`expr \( \( $bench_hypersample + 1 \) / 2 \) - 1`"
|
||||
@@ -1152,34 +1126,27 @@ EOF
|
||||
ls -la *.pix*
|
||||
fi
|
||||
$VERBOSE_ECHO "DEBUG: $CMP $PIX/${bench_testname}.pix ${bench_testname}.pix"
|
||||
cmp_result="`eval \\\"${CMP}\\\" \\\"${PIX}/${bench_testname}.pix\\\" ${bench_testname}.pix 2>&1`"
|
||||
bench_cmp_retval=$?
|
||||
cmp_result="`${CMP} ${PIX}/${bench_testname}.pix ${bench_testname}.pix 2>&1`"
|
||||
ret=$?
|
||||
|
||||
pixels_result="`echo \\\"$cmp_result\\\" | grep pixels`"
|
||||
if test "x$pixels_result" = "x" ; then
|
||||
$ECHO "$cmp_result"
|
||||
else
|
||||
$ECHO "$pixels_result"
|
||||
fi
|
||||
$ECHO "$cmp_result"
|
||||
|
||||
if test $bench_cmp_retval = 0 ; then
|
||||
if test $ret = 0 ; then
|
||||
# perfect match
|
||||
$ECHO ${bench_testname}.pix: answers are RIGHT
|
||||
elif test $bench_cmp_retval = 1 ; then
|
||||
elif test $ret = 1 ; then
|
||||
# off by one, acceptable
|
||||
$ECHO ${bench_testname}.pix: answers are RIGHT
|
||||
elif test $bench_cmp_retval = 2 ; then
|
||||
elif test $ret = 2 ; then
|
||||
# off by many, unacceptable
|
||||
$ECHO ${bench_testname}.pix: WRONG WRONG WRONG WRONG WRONG WRONG
|
||||
bench_retval=$bench_cmp_retval
|
||||
else
|
||||
# some other failure
|
||||
$ECHO ${bench_testname}.pix: BENCHMARK COMPARISON FAILURE
|
||||
bench_retval=$bench_cmp_retval
|
||||
fi
|
||||
|
||||
$VERBOSE_ECHO "DEBUG: Done benchmark testing on $bench_testname"
|
||||
return $bench_retval
|
||||
return $retval
|
||||
}
|
||||
|
||||
|
||||
@@ -1214,8 +1181,8 @@ perf ( ) {
|
||||
perf_ref_files=""
|
||||
perf_cur_files=""
|
||||
for perf_test in $perf_tests ; do
|
||||
perf_ref_log="${LOG}/${perf_test}.log"
|
||||
perf_cur_log="${perf_test}.log"
|
||||
perf_ref_log=${LOG}/${perf_test}.log
|
||||
perf_cur_log=${perf_test}.log
|
||||
for perf_log in "$perf_cur_log" "$perf_ref_log" ; do
|
||||
if test ! "x$perf_log" = "x" ; then
|
||||
if test ! -f "$perf_log" ; then
|
||||
@@ -1223,7 +1190,7 @@ perf ( ) {
|
||||
fi
|
||||
fi
|
||||
done
|
||||
perf_ref_files="$perf_ref_files \"$perf_ref_log\""
|
||||
perf_ref_files="$perf_ref_files $perf_ref_log"
|
||||
perf_cur_files="$perf_cur_files $perf_cur_log"
|
||||
done
|
||||
|
||||
@@ -1233,8 +1200,8 @@ perf ( ) {
|
||||
#
|
||||
# FIXME: should really iterate one file at a time so we don't
|
||||
# just zero-pad at the end
|
||||
perf_VGRREF="`eval grep RTFM $perf_ref_files | sed -n -e 's/^.*= *//' -e 's/ rays.*//p' | tr '\012' '\011' `"
|
||||
perf_CURVALS="`eval grep RTFM $perf_cur_files | sed -n -e 's/^.*= *//' -e 's/ rays.*//p' | tr '\012' '\011' `"
|
||||
perf_VGRREF=`grep RTFM $perf_ref_files | sed -n -e 's/^.*= *//' -e 's/ rays.*//p' | tr '\012' '\011' `
|
||||
perf_CURVALS=`grep RTFM $perf_cur_files | sed -n -e 's/^.*= *//' -e 's/ rays.*//p' | tr '\012' '\011' `
|
||||
|
||||
# if there were no reference values, we cannot compute timings
|
||||
if test "x$perf_VGRREF" = "x" ; then
|
||||
@@ -1262,13 +1229,13 @@ perf ( ) {
|
||||
|
||||
# see if we have a calculator
|
||||
perf_have_dc=yes
|
||||
out=`echo "1 1 + p" | dc 2>&1`
|
||||
echo "1 1 + p" | dc >/dev/null 2>&1
|
||||
if test ! x$? = x0 ; then
|
||||
perf_have_dc=no
|
||||
fi
|
||||
|
||||
perf_have_bc=yes
|
||||
out=`echo "1 + 1" | bc 2>&1`
|
||||
echo "1 + 1" | bc >/dev/null 2>&1
|
||||
if test ! x$? = x0 ; then
|
||||
perf_have_bc=no
|
||||
fi
|
||||
@@ -1327,9 +1294,9 @@ perf ( ) {
|
||||
start="`date '+%H %M %S'`"
|
||||
$ECHO "Running the BRL-CAD Benchmark tests... please wait ..."
|
||||
$ECHO
|
||||
benchmark_retval=0
|
||||
ret=0
|
||||
|
||||
bench moss all.g $RTARGS << EOF
|
||||
bench moss all.g $ARGS << EOF
|
||||
viewsize 1.572026215e+02;
|
||||
eye_pt 6.379990387e+01 3.271768951e+01 3.366661453e+01;
|
||||
viewrot -5.735764503e-01 8.191520572e-01 0.000000000e+00 0.000000000e+00
|
||||
@@ -1337,9 +1304,9 @@ viewrot -5.735764503e-01 8.191520572e-01 0.000000000e+00 0.000000000e+00
|
||||
7.424039245e-01 5.198368430e-01 4.226182699e-01 0.000000000e+00
|
||||
0.000000000e+00 0.000000000e+00 0.000000000e+00 1.000000000e+00 ;
|
||||
EOF
|
||||
benchmark_retval=`expr $benchmark_retval + $?`
|
||||
ret=`expr $ret + $?`
|
||||
|
||||
bench world all.g $RTARGS << EOF
|
||||
bench world all.g $ARGS << EOF
|
||||
viewsize 1.572026215e+02;
|
||||
eye_pt 6.379990387e+01 3.271768951e+01 3.366661453e+01;
|
||||
viewrot -5.735764503e-01 8.191520572e-01 0.000000000e+00 0.000000000e+00
|
||||
@@ -1347,9 +1314,9 @@ viewrot -5.735764503e-01 8.191520572e-01 0.000000000e+00 0.000000000e+00
|
||||
7.424039245e-01 5.198368430e-01 4.226182699e-01 0.000000000e+00
|
||||
0.000000000e+00 0.000000000e+00 0.000000000e+00 1.000000000e+00 ;
|
||||
EOF
|
||||
benchmark_retval=`expr $benchmark_retval + $?`
|
||||
ret=`expr $ret + $?`
|
||||
|
||||
bench star all $RTARGS << EOF
|
||||
bench star all $ARGS << EOF
|
||||
viewsize 2.500000000e+05;
|
||||
eye_pt 2.102677960e+05 8.455500000e+04 2.934714650e+04;
|
||||
viewrot -6.733560560e-01 6.130643360e-01 4.132114880e-01 0.000000000e+00
|
||||
@@ -1357,9 +1324,9 @@ viewrot -6.733560560e-01 6.130643360e-01 4.132114880e-01 0.000000000e+00
|
||||
4.896120540e-01 7.885590550e-01 -3.720948210e-01 0.000000000e+00
|
||||
0.000000000e+00 0.000000000e+00 0.000000000e+00 1.000000000e+00 ;
|
||||
EOF
|
||||
benchmark_retval=`expr $benchmark_retval + $?`
|
||||
ret=`expr $ret + $?`
|
||||
|
||||
bench bldg391 all.g $RTARGS << EOF
|
||||
bench bldg391 all.g $ARGS << EOF
|
||||
viewsize 1.800000000e+03;
|
||||
eye_pt 6.345012207e+02 8.633251343e+02 8.310771484e+02;
|
||||
viewrot -5.735764503e-01 8.191520572e-01 0.000000000e+00 0.000000000e+00
|
||||
@@ -1367,9 +1334,9 @@ viewrot -5.735764503e-01 8.191520572e-01 0.000000000e+00 0.000000000e+00
|
||||
7.424039245e-01 5.198368430e-01 4.226182699e-01 0.000000000e+00
|
||||
0.000000000e+00 0.000000000e+00 0.000000000e+00 1.000000000e+00;
|
||||
EOF
|
||||
benchmark_retval=`expr $benchmark_retval + $?`
|
||||
ret=`expr $ret + $?`
|
||||
|
||||
bench m35 all.g $RTARGS <<EOF
|
||||
bench m35 all.g $ARGS <<EOF
|
||||
viewsize 6.787387985e+03;
|
||||
eye_pt 3.974533127e+03 1.503320754e+03 2.874633221e+03;
|
||||
viewrot -5.527838919e-01 8.332423558e-01 1.171090926e-02 0.000000000e+00
|
||||
@@ -1377,28 +1344,28 @@ viewrot -5.527838919e-01 8.332423558e-01 1.171090926e-02 0.000000000e+00
|
||||
6.800964482e-01 4.429747496e-01 5.841593895e-01 0.000000000e+00
|
||||
0.000000000e+00 0.000000000e+00 0.000000000e+00 1.000000000e+00 ;
|
||||
EOF
|
||||
benchmark_retval=`expr $benchmark_retval + $?`
|
||||
ret=`expr $ret + $?`
|
||||
|
||||
bench sphflake scene.r $RTARGS <<EOF
|
||||
bench sphflake scene.r $ARGS <<EOF
|
||||
viewsize 2.556283261452611e+04;
|
||||
orientation 4.406810841785839e-01 4.005093234738861e-01 5.226451688385938e-01 6.101102288499644e-01;
|
||||
eye_pt 2.418500583758302e+04 -3.328563644344796e+03 8.489926952850350e+03;
|
||||
EOF
|
||||
benchmark_retval=`expr $benchmark_retval + $?`
|
||||
ret=`expr $ret + $?`
|
||||
|
||||
$ECHO
|
||||
$ECHO "... Done."
|
||||
$ECHO
|
||||
$ECHO "Total testing time elapsed: `eval \\\"$ELP\\\" $start`"
|
||||
$ECHO "Total testing time elapsed: `$ELP $start`"
|
||||
|
||||
# see if we fail
|
||||
if test ! "x$benchmark_retval" = "x0" ; then
|
||||
if test ! "x$ret" = "x0" ; then
|
||||
$ECHO
|
||||
$ECHO "THE BENCHMARK ANALYSIS DID NOT COMPLETE SUCCESSFULLY."
|
||||
$ECHO
|
||||
$ECHO "A benchmark failure means this is not a viable install of BRL-CAD. This may be"
|
||||
$ECHO "a new bug or (more likely) is a compilation configuration error. Ensure your"
|
||||
$ECHO "compiler has strict aliasing disabled, compilation is optimized, and you have"
|
||||
$ECHO "compiler has strict aliasing disabled, compilation is unoptimized, and you have"
|
||||
$ECHO "installed BRL-CAD (some platforms require this). If you still get a failure,"
|
||||
$ECHO "please report your configuration information to benchmark@brlcad.org"
|
||||
$ECHO
|
||||
@@ -1413,8 +1380,8 @@ fi
|
||||
# compute and output results #
|
||||
##############################
|
||||
|
||||
performance="`perf 'moss world star bldg391 m35 sphflake' $RTARGS 2>&1`"
|
||||
|
||||
performance="`perf 'moss world star bldg391 m35 sphflake' $ARGS`"
|
||||
if test $? = 0 ; then
|
||||
cat >> summary <<EOF
|
||||
$performance
|
||||
@@ -1529,8 +1496,8 @@ else
|
||||
$ECHO
|
||||
blankit=no
|
||||
|
||||
# BSD+
|
||||
look_for executable "a sysctl command" SYSCTL_CMD `echo "$PATH" | tr ":" "\n" | tr " " "\ " | sed 's/$/\/sysctl/g'`
|
||||
# BSD
|
||||
look_for executable "a sysctl command" SYSCTL_CMD `echo "$PATH" | tr ":" "\n" | sed 's/$/\/sysctl/g'`
|
||||
if test ! "x$SYSCTL_CMD" = "x" ; then
|
||||
$ECHO "Collecting system state information (via $SYSCTL_CMD)"
|
||||
preQUIET="$QUIET"
|
||||
@@ -1545,7 +1512,7 @@ else
|
||||
fi
|
||||
|
||||
# Solaris
|
||||
look_for executable "a prtdiag command" PRTDIAG_CMD `echo "$PATH" | tr ":" "\n" | tr " " "\ " | sed 's/$/\/prtdiag/g'`
|
||||
look_for executable "a prtdiag command" PRTDIAG_CMD `echo "$PATH" | tr ":" "\n" | sed 's/$/\/prtdiag/g'`
|
||||
if test ! "x$PRTDIAG_CMD" = "x" ; then
|
||||
$ECHO "Collecting system diagnostics information (via $PRTDIAG_CMD)"
|
||||
preQUIET="$QUIET"
|
||||
@@ -1558,7 +1525,7 @@ else
|
||||
fi
|
||||
|
||||
# AIX
|
||||
look_for executable "a prtconf command" PRTCONF_CMD `echo "$PATH" | tr ":" "\n" | tr " " "\ " | sed 's/$/\/prtconf/g'`
|
||||
look_for executable "a prtconf command" PRTCONF_CMD `echo "$PATH" | tr ":" "\n" | sed 's/$/\/prtconf/g'`
|
||||
if test ! "x$PRTCONF_CMD" = "x" ; then
|
||||
$ECHO "Collecting system configuration information (via $PRTCONF_CMD)"
|
||||
preQUIET="$QUIET"
|
||||
@@ -1571,7 +1538,7 @@ else
|
||||
fi
|
||||
|
||||
# SGI
|
||||
look_for executable "an hinv command" HINV_CMD `echo "$PATH" | tr ":" "\n" | tr " " "\ " | sed 's/$/\/hinv/g'`
|
||||
look_for executable "an hinv command" HINV_CMD `echo "$PATH" | tr ":" "\n" | sed 's/$/\/hinv/g'`
|
||||
if test ! "x$HINV_CMD" = "x" ; then
|
||||
$ECHO "Collecting system configuration information (via $HINV_CMD)"
|
||||
preQUIET="$QUIET"
|
||||
@@ -1596,19 +1563,6 @@ else
|
||||
blankit=yes
|
||||
fi
|
||||
|
||||
# Linux+
|
||||
look_for executable "an lscpu command" LSCPU_CMD `echo "$PATH" | tr ":" "\n" | tr " " "\ " | sed 's/$/\/lscpu/g'`
|
||||
if test ! "x$LSCPU_CMD" = "x" ; then
|
||||
$ECHO "Collecting system CPU information (via $LSCPU_CMD)"
|
||||
preQUIET="$QUIET"
|
||||
QUIET=1
|
||||
$ECHO "==============================================================================="
|
||||
$ECHO "`$LSCPU_CMD 2>&1`"
|
||||
$ECHO
|
||||
QUIET="$preQUIET"
|
||||
blankit=yes
|
||||
fi
|
||||
|
||||
if test "x$blankit" = "xyes" ; then
|
||||
$ECHO
|
||||
fi
|
||||
@@ -1616,12 +1570,12 @@ fi
|
||||
|
||||
# tell about the benchmark document
|
||||
look_for file "" BENCHMARK_TR \
|
||||
"${PATH_TO_THIS}/../share/brlcad/*.*.*/doc/benchmark.tr" \
|
||||
"${PATH_TO_THIS}/share/brlcad/*.*.*/doc/benchmark.tr" \
|
||||
"${PATH_TO_THIS}/share/brlcad/doc/benchmark.tr" \
|
||||
"${PATH_TO_THIS}/share/doc/benchmark.tr" \
|
||||
"${PATH_TO_THIS}/doc/benchmark.tr" \
|
||||
"${PATH_TO_THIS}/../doc/benchmark.tr" \
|
||||
${PATH_TO_THIS}/../share/brlcad/*.*.*/doc/benchmark.tr \
|
||||
${PATH_TO_THIS}/share/brlcad/*.*.*/doc/benchmark.tr \
|
||||
${PATH_TO_THIS}/share/brlcad/doc/benchmark.tr \
|
||||
${PATH_TO_THIS}/share/doc/benchmark.tr \
|
||||
${PATH_TO_THIS}/doc/benchmark.tr \
|
||||
${PATH_TO_THIS}/../doc/benchmark.tr \
|
||||
./benchmark.tr
|
||||
|
||||
$ECHO "Read the benchmark.tr document for more details on the BRL-CAD Benchmark."
|
||||
@@ -1633,10 +1587,6 @@ else
|
||||
fi
|
||||
$ECHO
|
||||
|
||||
# Cleanup
|
||||
rm -rf "$BU_DIR_CACHE"
|
||||
rm -rf "$LIBRT_CACHE"
|
||||
|
||||
$ECHO "Output was saved to $LOGFILE from `pwd`"
|
||||
$ECHO "Benchmark testing complete."
|
||||
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@
|
||||
# T R Y . S H
|
||||
# BRL-CAD
|
||||
#
|
||||
# Copyright (c) 2004-2026 United States Government as represented by
|
||||
# Copyright (c) 2004-2013 United States Government as represented by
|
||||
# the U.S. Army Research Laboratory.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@
|
||||
# V I E W D I F F . S H
|
||||
# BRL-CAD
|
||||
#
|
||||
# Copyright (c) 2004-2026 United States Government as represented by
|
||||
# Copyright (c) 2004-2013 United States Government as represented by
|
||||
# the U.S. Army Research Laboratory.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
|
||||
@@ -0,0 +1,197 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# This is a simple script to translate autotools style
|
||||
# configure options into CMake variables. The resulting
|
||||
# translation is then run as a CMake configure.
|
||||
|
||||
srcpath=$(dirname $0)
|
||||
options="$srcpath"
|
||||
while [ "$1" != "" ]
|
||||
do
|
||||
case $1
|
||||
in
|
||||
--enable-all) options="$options -DBRLCAD_BUNDLED_LIBS=ON";
|
||||
shift;;
|
||||
--disable-all) options="$options -DBRLCAD_BUNDLED_LIBS=OFF";
|
||||
shift;;
|
||||
--enable-opengl) options="$options -DBRLCAD_ENABLE_OPENGL=ON";
|
||||
shift;;
|
||||
--disable-opengl) options="$options -DBRLCAD_ENABLE_OPENGL=OFF";
|
||||
shift;;
|
||||
--enable-runtime-debug) options="$options -DBRLCAD_ENABLE_RUNTIME_DEBUG=ON";
|
||||
shift;;
|
||||
--disable-runtime-debug) options="$options -DBRLCAD_ENABLE_RUNTIME_DEBUG=OFF";
|
||||
shift;;
|
||||
--enable-run-time-debug) options="$options -DBRLCAD_ENABLE_RUNTIME_DEBUG=ON";
|
||||
shift;;
|
||||
--disable-run-time-debug) options="$options -DBRLCAD_ENABLE_RUNTIME_DEBUG=OFF";
|
||||
shift;;
|
||||
--enable-runtime-debugging) options="$options -DBRLCAD_ENABLE_RUNTIME_DEBUG=ON";
|
||||
shift;;
|
||||
--disable-runtime-debugging) options="$options -DBRLCAD_ENABLE_RUNTIME_DEBUG=OFF";
|
||||
shift;;
|
||||
--enable-run-time-debugging) options="$options -DBRLCAD_ENABLE_RUNTIME_DEBUG=ON";
|
||||
shift;;
|
||||
--disable-run-time-debugging) options="$options -DBRLCAD_ENABLE_RUNTIME_DEBUG=OFF";
|
||||
shift;;
|
||||
--enable-debug) options="$options -DBRLCAD_FLAGS_DEBUG=ON";
|
||||
shift;;
|
||||
--disable-debug) options="$options -DBRLCAD_FLAGS_DEBUG=OFF";
|
||||
shift;;
|
||||
--enable-flags-debug) options="$options -DBRLCAD_FLAGS_DEBUG=ON";
|
||||
shift;;
|
||||
--disable-flags-debug) options="$options -DBRLCAD_FLAGS_DEBUG=OFF";
|
||||
shift;;
|
||||
--enable-debug-flags) options="$options -DBRLCAD_FLAGS_DEBUG=ON";
|
||||
shift;;
|
||||
--disable-debug-flags) options="$options -DBRLCAD_FLAGS_DEBUG=OFF";
|
||||
shift;;
|
||||
--enable-warnings) options="$options -DBRLCAD_ENABLE_COMPILER_WARNINGS=ON";
|
||||
shift;;
|
||||
--disable-warnings) options="$options -DBRLCAD_ENABLE_COMPILER_WARNINGS=OFF";
|
||||
shift;;
|
||||
--enable-compiler-warnings) options="$options -DBRLCAD_ENABLE_COMPILER_WARNINGS=ON";
|
||||
shift;;
|
||||
--disable-compiler-warnings) options="$options -DBRLCAD_ENABLE_COMPILER_WARNINGS=OFF";
|
||||
shift;;
|
||||
--enable-strict) options="$options -DBRLCAD_ENABLE_STRICT=ON";
|
||||
shift;;
|
||||
--disable-strict) options="$options -DBRLCAD_ENABLE_STRICT=OFF";
|
||||
shift;;
|
||||
--enable-strict-compile) options="$options -DBRLCAD_ENABLE_STRICT=ON";
|
||||
shift;;
|
||||
--disable-strict-compile) options="$options -DBRLCAD_ENABLE_STRICT=OFF";
|
||||
shift;;
|
||||
--enable-strict-compile-flags) options="$options -DBRLCAD_ENABLE_STRICT=ON";
|
||||
shift;;
|
||||
--disable-strict-compile-flags) options="$options -DBRLCAD_ENABLE_STRICT=OFF";
|
||||
shift;;
|
||||
--enable-posix) options="$options -DENABLE_POSIX_COMPLIANCE=ON";
|
||||
shift;;
|
||||
--disable-posix) options="$options -DENABLE_POSIX_COMPLIANCE=OFF";
|
||||
shift;;
|
||||
--enable-c99) options="$options -DENABLE_C99_COMPLIANCE=ON";
|
||||
shift;;
|
||||
--disable-c99) options="$options -DENABLE_C99_COMPLIANCE=OFF";
|
||||
shift;;
|
||||
--enable-docs) options="$options -DBRLCAD_EXTRADOCS=ON";
|
||||
shift;;
|
||||
--disable-docs) options="$options -DBRLCAD_EXTRADOCS=OFF";
|
||||
shift;;
|
||||
--enable-extra-docs) options="$options -DBRLCAD_EXTRADOCS=ON";
|
||||
shift;;
|
||||
--disable-extra-docs) options="$options -DBRLCAD_EXTRADOCS=OFF";
|
||||
shift;;
|
||||
--enable-docbook) options="$options -DBRLCAD_EXTRADOCS=ON";
|
||||
shift;;
|
||||
--disable-docbook) options="$options -DBRLCAD_EXTRADOCS=OFF";
|
||||
shift;;
|
||||
--enable-regex) options="$options -DBRLCAD_REGEX=BUNDLED";
|
||||
shift;;
|
||||
--disable-regex) options="$options -DBRLCAD_REGEX=SYSTEM";
|
||||
shift;;
|
||||
--enable-zlib) options="$options -DBRLCAD_ZLIB=BUNDLED";
|
||||
shift;;
|
||||
--disable-zlib) options="$options -DBRLCAD_ZLIB=SYSTEM";
|
||||
shift;;
|
||||
--enable-libz) options="$options -DBRLCAD_ZLIB=BUNDLED";
|
||||
shift;;
|
||||
--disable-libz) options="$options -DBRLCAD_ZLIB=SYSTEM";
|
||||
shift;;
|
||||
--enable-lemon) options="$options -DBRLCAD_LEMON=BUNDLED";
|
||||
shift;;
|
||||
--disable-lemon) options="$options -DBRLCAD_LEMON=SYSTEM";
|
||||
shift;;
|
||||
--enable-re2c) options="$options -DBRLCAD_RE2C=BUNDLED";
|
||||
shift;;
|
||||
--disable-re2c) options="$options -DBRLCAD_RE2C=SYSTEM";
|
||||
shift;;
|
||||
--enable-perplex) options="$options -DBRLCAD_PERPLEX=BUNDLED";
|
||||
shift;;
|
||||
--disable-perplex) options="$options -DBRLCAD_PERPLEX=SYSTEM";
|
||||
shift;;
|
||||
--enable-xsltproc) options="$options -DBRLCAD_XSLTPROC=BUNDLED";
|
||||
shift;;
|
||||
--disable-xsltproc) options="$options -DBRLCAD_XSLTPROC=SYSTEM";
|
||||
shift;;
|
||||
--enable-xmllint) options="$options -DBRLCAD_XMLLINT=BUNDLED";
|
||||
shift;;
|
||||
--disable-xmllint) options="$options -DBRLCAD_XMLLINT=SYSTEM";
|
||||
shift;;
|
||||
--enable-termlib) options="$options -DBRLCAD_TERMLIB=BUNDLED";
|
||||
shift;;
|
||||
--disable-termlib) options="$options -DBRLCAD_TERMLIB=SYSTEM";
|
||||
shift;;
|
||||
--enable-png) options="$options -DBRLCAD_PNG=BUNDLED";
|
||||
shift;;
|
||||
--disable-png) options="$options -DBRLCAD_PNG=SYSTEM";
|
||||
shift;;
|
||||
--enable-utahrle) options="$options -DBRLCAD_UTAHRLE=BUNDLED";
|
||||
shift;;
|
||||
--disable-utahrle) options="$options -DBRLCAD_UTAHRLE=SYSTEM";
|
||||
shift;;
|
||||
--enable-tcl) options="$options -DBRLCAD_TCL=BUNDLED";
|
||||
shift;;
|
||||
--disable-tcl) options="$options -DBRLCAD_TCL=SYSTEM";
|
||||
shift;;
|
||||
--enable-tk) options="$options -DBRLCAD_TK=BUNDLED";
|
||||
shift;;
|
||||
--disable-tk) options="$options -DBRLCAD_TK=SYSTEM";
|
||||
shift;;
|
||||
--enable-itcl) options="$options -DBRLCAD_ITCL=BUNDLED";
|
||||
shift;;
|
||||
--disable-itcl) options="$options -DBRLCAD_ITCL=SYSTEM";
|
||||
shift;;
|
||||
--enable-itk) options="$options -DBRLCAD_ITK=BUNDLED";
|
||||
shift;;
|
||||
--disable-itk) options="$options -DBRLCAD_ITK=SYSTEM";
|
||||
shift;;
|
||||
--enable-iwidgets) options="$options -DBRLCAD_IWIDGETS=BUNDLED";
|
||||
shift;;
|
||||
--disable-iwidgets) options="$options -DBRLCAD_IWIDGETS=SYSTEM";
|
||||
shift;;
|
||||
--enable-tkhtml) options="$options -DBRLCAD_TKHTML=BUNDLED";
|
||||
shift;;
|
||||
--disable-tkhtml) options="$options -DBRLCAD_TKHTML=SYSTEM";
|
||||
shift;;
|
||||
--enable-tkpng) options="$options -DBRLCAD_TKPNG=BUNDLED";
|
||||
shift;;
|
||||
--disable-tkpng) options="$options -DBRLCAD_TKPNG=SYSTEM";
|
||||
shift;;
|
||||
--enable-tktable) options="$options -DBRLCAD_TKTABLE=BUNDLED";
|
||||
shift;;
|
||||
--disable-tktable) options="$options -DBRLCAD_TKTABLE=SYSTEM";
|
||||
shift;;
|
||||
--enable-opennurbs) options="$options -DBRLCAD_OPENNURBS=BUNDLED";
|
||||
shift;;
|
||||
--disable-opennurbs) options="$options -DBRLCAD_OPENNURBS=SYSTEM";
|
||||
shift;;
|
||||
--enable-scl) options="$options -DBRLCAD_SCL=BUNDLED";
|
||||
shift;;
|
||||
--disable-scl) options="$options -DBRLCAD_SCL=SYSTEM";
|
||||
shift;;
|
||||
--enable-step) options="$options -DBRLCAD_SCL=BUNDLED";
|
||||
shift;;
|
||||
--disable-step) options="$options -DBRLCAD_SCL=SYSTEM";
|
||||
shift;;
|
||||
--enable-step-class-libraries) options="$options -DBRLCAD_SCL=BUNDLED";
|
||||
shift;;
|
||||
--disable-step-class-libraries) options="$options -DBRLCAD_SCL=SYSTEM";
|
||||
shift;;
|
||||
--enable-vds) options="$options -DBRLCAD_LIBVDS=BUNDLED";
|
||||
shift;;
|
||||
--disable-vds) options="$options -DBRLCAD_LIBVDS=SYSTEM";
|
||||
shift;;
|
||||
--enable-gdiam) options="$options -DBRLCAD_LIBGDIAM=BUNDLED";
|
||||
shift;;
|
||||
--disable-gdiam) options="$options -DBRLCAD_LIBGDIAM=SYSTEM";
|
||||
shift;;
|
||||
--prefix=*) inputstr=$1;
|
||||
options="$options -DCMAKE_INSTALL_PREFIX=${inputstr#--prefix=}";
|
||||
shift;;
|
||||
*) echo "Warning: unknown option $1";
|
||||
shift;;
|
||||
esac
|
||||
done
|
||||
echo cmake $options
|
||||
cmake $options
|
||||
Binary file not shown.
+42
-307
@@ -1,188 +1,4 @@
|
||||
function(G_TARGET in_model folder)
|
||||
# Initialize
|
||||
set(MODEL_TYPE "UNKNOWN")
|
||||
set(CONV_SUCCESS_CODES 0)
|
||||
|
||||
# Regardless of what we decide, let CMake know about the file
|
||||
cmakefiles(${CMAKE_CURRENT_SOURCE_DIR}/${in_model})
|
||||
|
||||
# Find our conversion type
|
||||
set(model_types "3dm;asc;comgeom;fg4;stp")
|
||||
foreach(mt ${model_types})
|
||||
if("${MODEL_TYPE}" STREQUAL "UNKNOWN")
|
||||
if("${in_model}" MATCHES ".${mt}$")
|
||||
set(MODEL_TYPE "${mt}")
|
||||
string(REGEX REPLACE "([0-9a-z]*).${mt}" "\\1" in_model_root "${in_model}")
|
||||
endif("${in_model}" MATCHES ".${mt}$")
|
||||
endif("${MODEL_TYPE}" STREQUAL "UNKNOWN")
|
||||
endforeach(mt ${model_types})
|
||||
if("${MODEL_TYPE}" STREQUAL "UNKNOWN")
|
||||
message(FATAL_ERROR "Unable to identify input model type for file ${in_model}")
|
||||
endif("${MODEL_TYPE}" STREQUAL "UNKNOWN")
|
||||
|
||||
# Make sure variables are set up for configure_file
|
||||
set(in_model_root "${in_model_root}")
|
||||
|
||||
# Find our output file and path
|
||||
string(REPLACE "${CMAKE_SOURCE_DIR}/" "" rel_dir "${CMAKE_CURRENT_SOURCE_DIR}")
|
||||
set(output_file ${DATA_DIR}/${rel_dir}/${in_model_root}.g)
|
||||
set(CONV_OUTPUT_PATH "${CMAKE_BINARY_DIR}/${output_file}")
|
||||
set(log_file ${CMAKE_CURRENT_BINARY_DIR}/${in_model_root}.log)
|
||||
|
||||
# Make sure the output db target directory is there
|
||||
file(MAKE_DIRECTORY "${CMAKE_BINARY_DIR}/${DATA_DIR}/${rel_dir}")
|
||||
|
||||
# Rhino 3DM file
|
||||
if(${MODEL_TYPE} STREQUAL "3dm")
|
||||
if(NOT TARGET 3dm-g)
|
||||
return()
|
||||
endif(NOT TARGET 3dm-g)
|
||||
set(CONV_ARGS "-o \"${CMAKE_BINARY_DIR}/${output_file}\" \"${CMAKE_CURRENT_SOURCE_DIR}/${in_model}\"")
|
||||
configure_file("${CMAKE_SOURCE_DIR}/db/to_g.cmake.in" "${CMAKE_CURRENT_BINARY_DIR}/${in_model_root}.cmake" @ONLY)
|
||||
distclean("${CMAKE_CURRENT_BINARY_DIR}/${in_model_root}.cmake")
|
||||
# Custom command to generate the output
|
||||
add_custom_command(
|
||||
OUTPUT ${CMAKE_BINARY_DIR}/${output_file}
|
||||
COMMAND ${CMAKE_COMMAND} -E remove "${CMAKE_BINARY_DIR}/${output_file}"
|
||||
COMMAND ${CMAKE_COMMAND} -DEXEC=$<TARGET_FILE:3dm-g> -P "${CMAKE_CURRENT_BINARY_DIR}/${in_model_root}.cmake"
|
||||
DEPENDS 3dm-g ${CMAKE_CURRENT_SOURCE_DIR}/${in_model}
|
||||
)
|
||||
endif(${MODEL_TYPE} STREQUAL "3dm")
|
||||
|
||||
# BRL-CAD ASCII database
|
||||
if(${MODEL_TYPE} STREQUAL "asc")
|
||||
set(CONV_ARGS "\"${CMAKE_CURRENT_SOURCE_DIR}/${in_model}\" \"${CMAKE_BINARY_DIR}/${output_file}\"")
|
||||
configure_file("${CMAKE_SOURCE_DIR}/db/to_g.cmake.in" "${CMAKE_CURRENT_BINARY_DIR}/${in_model_root}.cmake" @ONLY)
|
||||
distclean("${CMAKE_CURRENT_BINARY_DIR}/${in_model_root}.cmake")
|
||||
if(BRLCAD_ENABLE_TCL)
|
||||
if(NOT TARGET asc2g)
|
||||
return()
|
||||
endif(NOT TARGET asc2g)
|
||||
# Custom command to generate the output
|
||||
add_custom_command(
|
||||
OUTPUT ${CMAKE_BINARY_DIR}/${output_file}
|
||||
COMMAND ${CMAKE_COMMAND} -E remove ${CMAKE_BINARY_DIR}/${output_file}
|
||||
COMMAND ${CMAKE_COMMAND} -DEXEC=$<TARGET_FILE:asc2g> -P "${CMAKE_CURRENT_BINARY_DIR}/${in_model_root}.cmake"
|
||||
DEPENDS asc2g "${CMAKE_CURRENT_SOURCE_DIR}/${in_model}"
|
||||
)
|
||||
else(BRLCAD_ENABLE_TCL)
|
||||
if(NOT TARGET gcv)
|
||||
return()
|
||||
endif(NOT TARGET gcv)
|
||||
# Custom command to generate the output
|
||||
add_custom_command(
|
||||
OUTPUT ${CMAKE_BINARY_DIR}/${output_file}
|
||||
COMMAND ${CMAKE_COMMAND} -E remove ${CMAKE_BINARY_DIR}/${output_file}
|
||||
COMMAND ${CMAKE_COMMAND} -DEXEC=$<TARGET_FILE:gcv> -P "${CMAKE_CURRENT_BINARY_DIR}/${in_model_root}.cmake"
|
||||
DEPENDS gcv "${CMAKE_CURRENT_SOURCE_DIR}/${in_model}"
|
||||
)
|
||||
endif(BRLCAD_ENABLE_TCL)
|
||||
endif(${MODEL_TYPE} STREQUAL "asc")
|
||||
|
||||
# COMGEOM (pre BRL-CAD Geometry Information For Targets (GIFT) files)
|
||||
if(${MODEL_TYPE} STREQUAL "comgeom")
|
||||
if(NOT TARGET comgeom-g)
|
||||
return()
|
||||
endif(NOT TARGET comgeom-g)
|
||||
set(CONV_ARGS "-v 5 \"${CMAKE_CURRENT_SOURCE_DIR}/${in_model}\" \"${CMAKE_BINARY_DIR}/${output_file}\"")
|
||||
configure_file("${CMAKE_SOURCE_DIR}/db/to_g.cmake.in" "${CMAKE_CURRENT_BINARY_DIR}/${in_model_root}.cmake" @ONLY)
|
||||
distclean("${CMAKE_CURRENT_BINARY_DIR}/${in_model_root}.cmake")
|
||||
# Custom command to generate the output
|
||||
add_custom_command(
|
||||
OUTPUT ${CMAKE_BINARY_DIR}/${output_file}
|
||||
COMMAND ${CMAKE_COMMAND} -E remove "${CMAKE_BINARY_DIR}/${output_file}"
|
||||
COMMAND ${CMAKE_COMMAND} -DEXEC=$<TARGET_FILE:comgeom-g> -P "${CMAKE_CURRENT_BINARY_DIR}/${in_model_root}.cmake"
|
||||
DEPENDS comgeom-g ${CMAKE_CURRENT_SOURCE_DIR}/${in_model}
|
||||
)
|
||||
endif(${MODEL_TYPE} STREQUAL "comgeom")
|
||||
|
||||
# FASTGEN 4
|
||||
if(${MODEL_TYPE} STREQUAL "fg4")
|
||||
if(NOT TARGET fast4-g)
|
||||
return()
|
||||
endif(NOT TARGET fast4-g)
|
||||
set(CONV_ARGS "\"${CMAKE_CURRENT_SOURCE_DIR}/${in_model}\" \"${CMAKE_BINARY_DIR}/${output_file}\"")
|
||||
configure_file("${CMAKE_SOURCE_DIR}/db/to_g.cmake.in" "${CMAKE_CURRENT_BINARY_DIR}/${in_model_root}.cmake" @ONLY)
|
||||
distclean("${CMAKE_CURRENT_BINARY_DIR}/${in_model_root}.cmake")
|
||||
add_custom_command(
|
||||
OUTPUT ${CMAKE_BINARY_DIR}/${output_file}
|
||||
COMMAND ${CMAKE_COMMAND} -E remove "${CMAKE_BINARY_DIR}/${output_file}"
|
||||
COMMAND ${CMAKE_COMMAND} -DEXEC=$<TARGET_FILE:fast4-g> -P "${CMAKE_CURRENT_BINARY_DIR}/${in_model_root}.cmake"
|
||||
DEPENDS fast4-g ${CMAKE_CURRENT_SOURCE_DIR}/${in_model}
|
||||
)
|
||||
endif(${MODEL_TYPE} STREQUAL "fg4")
|
||||
|
||||
# STEP AP203
|
||||
if(${MODEL_TYPE} STREQUAL "stp")
|
||||
if(NOT TARGET step-g)
|
||||
return()
|
||||
endif(NOT TARGET step-g)
|
||||
set(CONV_ARGS "-O \"${CMAKE_BINARY_DIR}/${output_file}\" \"${CMAKE_CURRENT_SOURCE_DIR}/${in_model}\"")
|
||||
# step-g uses status 1 for useful, deliberately published partial output.
|
||||
# Installed sample databases should retain that geometry; statuses 2 and
|
||||
# above, or a missing output file, remain build failures.
|
||||
set(CONV_SUCCESS_CODES "0;1")
|
||||
configure_file("${CMAKE_SOURCE_DIR}/db/to_g.cmake.in" "${CMAKE_CURRENT_BINARY_DIR}/${in_model_root}.cmake" @ONLY)
|
||||
distclean("${CMAKE_CURRENT_BINARY_DIR}/${in_model_root}.cmake")
|
||||
# Custom command to generate the output
|
||||
add_custom_command(
|
||||
OUTPUT ${CMAKE_BINARY_DIR}/${output_file}
|
||||
COMMAND ${CMAKE_COMMAND} -E remove "${CMAKE_BINARY_DIR}/${output_file}"
|
||||
COMMAND ${CMAKE_COMMAND} -DEXEC=$<TARGET_FILE:step-g> -P "${CMAKE_CURRENT_BINARY_DIR}/${in_model_root}.cmake"
|
||||
DEPENDS step-g ${CMAKE_CURRENT_SOURCE_DIR}/${in_model}
|
||||
)
|
||||
endif(${MODEL_TYPE} STREQUAL "stp")
|
||||
|
||||
# If we got this far, do the target, install and clean-up rules
|
||||
add_custom_target(${in_model_root}.g ALL DEPENDS ${CMAKE_BINARY_DIR}/${output_file})
|
||||
set_target_properties(${in_model_root}.g PROPERTIES FOLDER "${folder}")
|
||||
|
||||
if(BRLCAD_INSTALL_EXAMPLE_GEOMETRY)
|
||||
install(FILES ${CMAKE_BINARY_DIR}/${output_file} DESTINATION ${DATA_DIR}/${rel_dir})
|
||||
endif(BRLCAD_INSTALL_EXAMPLE_GEOMETRY)
|
||||
|
||||
set_property(DIRECTORY APPEND PROPERTY ADDITIONAL_MAKE_CLEAN_FILES "${log_file}")
|
||||
distclean("${log_file}")
|
||||
endfunction(G_TARGET in_model folder)
|
||||
|
||||
function(PIX_TARGET in_image folder)
|
||||
if(NOT TARGET png-pix)
|
||||
return()
|
||||
endif(NOT TARGET png-pix)
|
||||
|
||||
cmakefiles(${CMAKE_CURRENT_SOURCE_DIR}/${in_image})
|
||||
get_filename_component(in_image_root "${in_image}" NAME_WE)
|
||||
string(REPLACE "${CMAKE_SOURCE_DIR}/" "" rel_dir "${CMAKE_CURRENT_SOURCE_DIR}")
|
||||
set(output_file ${DATA_DIR}/${rel_dir}/${in_image_root}.pix)
|
||||
set(output_path "${CMAKE_BINARY_DIR}/${output_file}")
|
||||
set(conversion_file "${CMAKE_CURRENT_BINARY_DIR}/${in_image_root}_pix.cmake")
|
||||
|
||||
set(PIX_INPUT "${CMAKE_CURRENT_SOURCE_DIR}/${in_image}")
|
||||
set(PIX_OUTPUT "${output_path}")
|
||||
set(PIX_LABEL "${in_image_root}.pix")
|
||||
|
||||
file(MAKE_DIRECTORY "${CMAKE_BINARY_DIR}/${DATA_DIR}/${rel_dir}")
|
||||
configure_file("${CMAKE_SOURCE_DIR}/db/to_pix.cmake.in" "${conversion_file}" @ONLY)
|
||||
distclean("${conversion_file}")
|
||||
|
||||
add_custom_command(
|
||||
OUTPUT ${output_path}
|
||||
COMMAND ${CMAKE_COMMAND} -E remove "${output_path}"
|
||||
COMMAND ${CMAKE_COMMAND} -DEXEC=$<TARGET_FILE:png-pix> -P "${conversion_file}"
|
||||
DEPENDS png-pix "${PIX_INPUT}"
|
||||
)
|
||||
add_custom_target(${in_image_root}.pix ALL DEPENDS ${output_path})
|
||||
set_target_properties(${in_image_root}.pix PROPERTIES FOLDER "${folder}")
|
||||
|
||||
if(BRLCAD_INSTALL_EXAMPLE_GEOMETRY)
|
||||
install(FILES ${output_path} DESTINATION ${DATA_DIR}/${rel_dir})
|
||||
endif(BRLCAD_INSTALL_EXAMPLE_GEOMETRY)
|
||||
|
||||
distclean("${output_path}")
|
||||
endfunction(PIX_TARGET in_image folder)
|
||||
|
||||
set(
|
||||
G_BENCHMARK_MODELS
|
||||
set(G_BENCHMARK_MODELS
|
||||
bldg391.asc
|
||||
m35.asc
|
||||
moss.asc
|
||||
@@ -191,14 +7,9 @@ set(
|
||||
world.asc
|
||||
)
|
||||
|
||||
set(
|
||||
G_SAMPLE_MODELS
|
||||
aet.asc
|
||||
arb8_showcase.asc
|
||||
annual_gift_man.asc
|
||||
set(G_SAMPLE_MODELS
|
||||
${G_BENCHMARK_MODELS}
|
||||
axis.asc
|
||||
bearing.asc
|
||||
bicycle_wheel.asc
|
||||
boolean-ops.asc
|
||||
castle.asc
|
||||
cornell.asc
|
||||
@@ -207,9 +18,6 @@ set(
|
||||
crod.asc
|
||||
cube.asc
|
||||
demo.asc
|
||||
die.asc
|
||||
earth.asc
|
||||
gaia.asc
|
||||
galileo.asc
|
||||
goliath.asc
|
||||
havoc.asc
|
||||
@@ -217,136 +25,63 @@ set(
|
||||
ktank.asc
|
||||
lgt-test.asc
|
||||
operators.asc
|
||||
photo_holder.asc
|
||||
pic.asc
|
||||
pinewood.asc
|
||||
primitives.asc
|
||||
prim.asc
|
||||
radialgrid.asc
|
||||
rounds.asc
|
||||
shipping_container.asc
|
||||
tank_car.asc
|
||||
terra.asc
|
||||
toyjeep.asc
|
||||
traffic_light.asc
|
||||
truck.asc
|
||||
wave.asc
|
||||
woodsman.asc
|
||||
xmp.asc
|
||||
)
|
||||
add_subdirectory(chess)
|
||||
add_subdirectory(comgeom)
|
||||
add_subdirectory(nist)
|
||||
add_subdirectory(faa)
|
||||
|
||||
pix_target(earth.png "BRL-CAD Geometry Models/Sample")
|
||||
# Get our root path
|
||||
if(CMAKE_CONFIGURATION_TYPES)
|
||||
set(bin_root "${CMAKE_BINARY_DIR}/${CMAKE_CFG_INTDIR}")
|
||||
else(CMAKE_CONFIGURATION_TYPES)
|
||||
set(bin_root "${CMAKE_BINARY_DIR}")
|
||||
endif(CMAKE_CONFIGURATION_TYPES)
|
||||
|
||||
# Make sure the db directories are there
|
||||
if(CMAKE_CONFIGURATION_TYPES)
|
||||
foreach(CFG_TYPE ${CMAKE_CONFIGURATION_TYPES})
|
||||
file(MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/${CFG_TYPE}/${DATA_DIR}/db)
|
||||
endforeach(CFG_TYPE ${CMAKE_CONFIGURATION_TYPES})
|
||||
else(CMAKE_CONFIGURATION_TYPES)
|
||||
file(MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/${DATA_DIR}/db)
|
||||
endif(CMAKE_CONFIGURATION_TYPES)
|
||||
|
||||
foreach(g_model ${G_SAMPLE_MODELS})
|
||||
string(REGEX REPLACE "([0-9a-z]*).asc" "\\1" g_model_root "${g_model}")
|
||||
set(output_file ${bin_root}/${DATA_DIR}/db/${g_model_root}.g)
|
||||
add_custom_command(
|
||||
OUTPUT ${output_file}
|
||||
COMMAND asc2g ${CMAKE_CURRENT_SOURCE_DIR}/${g_model} ${output_file}
|
||||
DEPENDS asc2g ${CMAKE_CURRENT_SOURCE_DIR}/${g_model}
|
||||
)
|
||||
add_custom_target(${g_model_root}.g ALL DEPENDS ${output_file})
|
||||
if(BRLCAD_INSTALL_EXAMPLE_GEOMETRY)
|
||||
if(NOT "${CMAKE_CFG_INTDIR}" STREQUAL "." AND CMAKE_CONFIGURATION_FILES)
|
||||
string(REPLACE "${CMAKE_CFG_INTDIR}" "\${BUILD_TYPE}" output_file "${output_file}")
|
||||
endif(NOT "${CMAKE_CFG_INTDIR}" STREQUAL "." AND CMAKE_CONFIGURATION_FILES)
|
||||
install(FILES ${output_file} DESTINATION ${DATA_DIR}/db)
|
||||
endif(BRLCAD_INSTALL_EXAMPLE_GEOMETRY)
|
||||
set(BUILT_MODELS "${BUILT_MODELS};${output_file}")
|
||||
endforeach(g_model ${G_SAMPLE_MODELS})
|
||||
CMAKEFILES(${G_SAMPLE_MODELS})
|
||||
|
||||
SET_DIRECTORY_PROPERTIES(PROPERTIES ADDITIONAL_MAKE_CLEAN_FILES "${BUILT_MODELS}")
|
||||
|
||||
if(BRLCAD_INSTALL_EXAMPLE_GEOMETRY)
|
||||
brlcad_adddata(earth.png db)
|
||||
BRLCAD_ADDDATA(terra.dsp db)
|
||||
endif(BRLCAD_INSTALL_EXAMPLE_GEOMETRY)
|
||||
|
||||
foreach(g_input ${G_BENCHMARK_MODELS})
|
||||
g_target(${g_input} "BRL-CAD Geometry Models/Benchmark")
|
||||
endforeach(g_input ${G_BENCHMARK_MODELS})
|
||||
|
||||
foreach(g_input ${G_SAMPLE_MODELS})
|
||||
g_target(${g_input} "BRL-CAD Geometry Models/Sample")
|
||||
endforeach(g_input ${G_SAMPLE_MODELS})
|
||||
|
||||
if(BRLCAD_INSTALL_EXAMPLE_GEOMETRY AND TARGET gcv)
|
||||
brlcad_adddata(1647260.dsp db)
|
||||
brlcad_adddata(ebm_logo.bw db)
|
||||
brlcad_adddata(terra.bin db)
|
||||
brlcad_adddata(vol_data.bw db)
|
||||
endif(BRLCAD_INSTALL_EXAMPLE_GEOMETRY AND TARGET gcv)
|
||||
|
||||
if(SH_EXEC)
|
||||
if(TARGET mged OR TARGET gcv)
|
||||
set(conversion_g_files)
|
||||
set(conversion_g_files_fp)
|
||||
set(conversion_deps_list)
|
||||
|
||||
macro(Sh_Conversion_Test gfile depends_list)
|
||||
if(TARGET mged)
|
||||
add_custom_target(
|
||||
convert-${gfile}
|
||||
COMMAND
|
||||
${SH_EXEC} ${CMAKE_SOURCE_DIR}/sh/conversion.sh GED=$<TARGET_FILE:mged>
|
||||
${CMAKE_BINARY_DIR}/${DATA_DIR}/db/${gfile}
|
||||
)
|
||||
else()
|
||||
add_custom_target(
|
||||
convert-${gfile}
|
||||
COMMAND
|
||||
${SH_EXEC} ${CMAKE_SOURCE_DIR}/sh/conversion.sh GED=$<TARGET_FILE:gcv>
|
||||
${CMAKE_BINARY_DIR}/${DATA_DIR}/db/${gfile}
|
||||
)
|
||||
endif(TARGET mged)
|
||||
set_target_properties(convert-${gfile} PROPERTIES EXCLUDE_FROM_DEFAULT_BUILD 1)
|
||||
set_target_properties(convert-${gfile} PROPERTIES FOLDER "BRL-CAD Conversion Tests")
|
||||
set(conversion_g_files ${conversion_g_files} ${gfile})
|
||||
if(NOT "${depends_list}" STREQUAL "")
|
||||
add_dependencies(convert-${gfile} ${depends_list})
|
||||
set(conversion_deps_list ${conversion_deps_list} ${depends_list})
|
||||
endif(NOT "${depends_list}" STREQUAL "")
|
||||
endmacro(Sh_Conversion_Test)
|
||||
|
||||
foreach(g_input ${G_BENCHMARK_MODELS})
|
||||
get_filename_component(GROOT "${g_input}" NAME_WE)
|
||||
if(TARGET mged)
|
||||
sh_conversion_test(${GROOT}.g "mged")
|
||||
else()
|
||||
sh_conversion_test(${GROOT}.g "gcv")
|
||||
endif(TARGET mged)
|
||||
endforeach(g_input ${G_BENCHMARK_MODELS})
|
||||
foreach(g_input ${G_SAMPLE_MODELS})
|
||||
get_filename_component(GROOT "${g_input}" NAME_WE)
|
||||
if(TARGET mged)
|
||||
sh_conversion_test(${GROOT}.g "mged")
|
||||
else()
|
||||
sh_conversion_test(${GROOT}.g "gcv")
|
||||
endif(TARGET mged)
|
||||
endforeach(g_input ${G_SAMPLE_MODELS})
|
||||
|
||||
list(REMOVE_DUPLICATES conversion_deps_list)
|
||||
foreach(gfile ${conversion_g_files})
|
||||
set(conversion_g_files_fp ${conversion_g_files_fp} "${CMAKE_BINARY_DIR}/${DATA_DIR}/db/${gfile}")
|
||||
endforeach(gfile ${conversion_g_files})
|
||||
if(TARGET mged)
|
||||
add_custom_target(
|
||||
convert
|
||||
COMMAND ${SH_EXEC} ${CMAKE_SOURCE_DIR}/sh/conversion.sh GED=$<TARGET_FILE:mged> ${conversion_g_files_fp}
|
||||
)
|
||||
else()
|
||||
add_custom_target(
|
||||
convert
|
||||
COMMAND ${SH_EXEC} ${CMAKE_SOURCE_DIR}/sh/conversion.sh GED=$<TARGET_FILE:gcv> ${conversion_g_files_fp}
|
||||
)
|
||||
endif(TARGET mged)
|
||||
set_target_properties(convert PROPERTIES EXCLUDE_FROM_DEFAULT_BUILD 1)
|
||||
set_target_properties(convert PROPERTIES FOLDER "BRL-CAD Conversion Tests")
|
||||
add_dependencies(convert ${conversion_deps_list})
|
||||
endif(TARGET mged OR TARGET gcv)
|
||||
endif(SH_EXEC)
|
||||
|
||||
cmakefiles(
|
||||
${G_BENCHMARK_MODELS}
|
||||
${G_SAMPLE_MODELS}
|
||||
1647260.dsp
|
||||
CMakeLists.txt
|
||||
aet.rt
|
||||
CMAKEFILES(
|
||||
cornell.rt
|
||||
cube.rt
|
||||
db.php
|
||||
ebm_logo.bw
|
||||
earth.png
|
||||
include/ctype.inc
|
||||
include/debug.inc
|
||||
terra.bin
|
||||
to_g.cmake.in
|
||||
to_pix.cmake.in
|
||||
traffic_light.rt
|
||||
vol_data.bw
|
||||
include
|
||||
)
|
||||
|
||||
# Local Variables:
|
||||
|
||||
-68
@@ -1,68 +0,0 @@
|
||||
title {Untitled BRL-CAD Database}
|
||||
units mm
|
||||
put {xyzringtrc.s} tgc V {0.31168735027313232421875 0.31356084346771240234375 0.2343517243862152099609375} H {-0.02296111360192298889160156 -0.02476786263287067413330078 0.03948847576975822448730469} A {-0.003937630914151668548583984 -0.02411045134067535400390625 -0.01741208322346210479736328} B {0.02662250958383083343505859 -0.01068659685552120208740234 0.008777192793786525726318359} C {-3.937628207495436072349548E-05 -0.0002411044843029230833053589 -0.0001741207961458712816238403} D {0.0002662249607965350151062012 -0.0001068659257725812494754791 8.77717902767471969127655E-05}
|
||||
put {viewdirtrc.s} tgc V {0.08660250157117843627929688 0.08660250157117843627929688 0.08660250157117843627929688} H {-0.07794228941202163696289062 -0.07794228941202163696289062 -0.07794228941202163696289062} A {0 0.02828427031636238098144531 -0.02828427031636238098144531} B {0.03265986219048500061035156 -0.01632993109524250030517578 -0.01632993109524250030517578} C {0 0.000212132028536871075630188 -0.000212132028536871075630188} D {0.0002449489838909357786178589 -0.0001224744919454678893089294 -0.0001224744919454678893089294}
|
||||
put {twistpanel.r} comb region yes tree {l twistpanel.c}
|
||||
attr set {twistpanel.r} {color} {232/198/232} {shader} {glass {tr 0.6}} {region} {R} {region_id} {1000} {material_id} {1} {los} {100}
|
||||
put {xyzringcut.c} comb region no tree {- {- {- {- {- {- {- {- {- {- {l ringxyztor.s} {l cut0.s}} {l cut1.s}} {l cut2.s}} {l cut4.s}} {l xrcc.s}} {l yrcc.s}} {l zrcc.s}} {l viewdirrcc.s}} {l xyzcutrcc.s}} {l xyzringtrc.s}}
|
||||
put {viewdirrcc.s} tgc V {0.779421329498291015625 0.779421329498291015625 0.779421329498291015625} H {-0.6928203105926513671875 -0.6928203105926513671875 -0.6928203105926513671875} A {0 0.007071067579090595245361328 -0.007071067579090595245361328} B {0.008164965547621250152587891 -0.004082482773810625076293945 -0.004082482773810625076293945} C {0 0.007071067579090595245361328 -0.007071067579090595245361328} D {0.008164965547621250152587891 -0.004082482773810625076293945 -0.004082482773810625076293945}
|
||||
put {twistpanel.c} comb region no tree {- {- {- {l twistrcc.s} {l twisttor.s}} {l twisttrc.s}} {l viewdirrcc.s}}
|
||||
put {ringxytor.s} tor V {0 0 0} H {0 0 1} r_a 0.5 r_h 0.009999999776482582092285156
|
||||
put {twistring.r} comb region yes tree {l twistring.c}
|
||||
attr set {twistring.r} {color} {232/198/232} {shader} {mirror {tr .1 re 0.4}} {region} {R} {region_id} {1000} {material_id} {1} {los} {100}
|
||||
put {xyringtrc.s} tgc V {0.3913685381412506103515625 0.3006020486354827880859375 -0.0009004921885207295417785645} H {-0.03143119439482688903808594 0.04401883110404014587402344 -0.0006720747915096580982208252} A {0.02089671231806278228759766 0.01464617997407913208007812 -0.01800444535911083221435547} B {-0.01446941774338483810424805 -0.01072130445390939712524414 -0.02551533468067646026611328} C {0.0002089670742861926555633545 0.0001464617671445012092590332 -0.0001800443860702216625213623} D {-0.0001446941751055419445037842 -0.0001072130180546082556247711 -0.0002551533398218452930450439}
|
||||
put {xyzcutrcc.s} arb8 V1 {0.285196959972381591796875 0.223926544189453125 0.2792418301105499267578125} V2 {0.3270788453519344329833984 0.2655878327786922454833984 0.2198253460228443145751953} V3 {0.3691307827830314636230469 0.3075636327266693115234375 0.2788994473521597683429718} V4 {0.3272488489747047424316406 0.2659022919833660125732422 0.3383159413933753967285156} V5 {0.2260562554001808166503906 0.2832767628133296966552734 0.2791691728780278936028481} V6 {0.2679381202906370162963867 0.3249380290508270263671875 0.2197526805102825164794922} V7 {0.3099901042878627777099609 0.366913974285125732421875 0.2788267984578851610422134} V8 {0.2681080885231494903564453 0.3252525255084037780761719 0.3382433503866195678710938}
|
||||
put {xyringcut.c} comb region no tree {- {- {- {- {- {- {- {- {- {l ringxytor.s} {l cut0.s}} {l cut1.s}} {l cut3.s}} {l xrcc.s}} {l yrcc.s}} {l zrcc.s}} {l ringxyztor.s}} {l xycutrcc.s}} {l xyringtrc.s}}
|
||||
put {testdisks.c} comb region no tree {u {- {- {- {l xyzrcc.s} {l cut0.s}} {l cut1.s}} {l cut2.s}} {- {- {- {- {- {l xyrcc.s} {l cut0.s}} {l cut1.s}} {l cut2.s}} {l cut3.s}} {l cut0.s}}}
|
||||
put {twistring.c} comb region no tree {u {- {- {l twisttor.s} {l twistcut.s}} {l twisttrc.s}} {l twisttrc.s}}
|
||||
put {halfplane.s} half N {0 0 1} d -0.536277353763580322265625
|
||||
put {halfplane.r} comb region yes tree {l halfplane.s}
|
||||
attr set {halfplane.r} {color} {255/255/255} {shader} {stack {{phong {sp 0.05 di 0.95}} }} {region} {R} {region_id} {1002} {material_id} {1} {los} {100}
|
||||
put {twisttor.s} tor V {0.449999988079071044921875 0.449999988079071044921875 0.449999988079071044921875} H {-0.577350269189625731058868 -0.577350269189625731058868 -0.577350269189625731058868} r_a 0.1500000016475442066177237 r_h 0.01000000030444709100962974
|
||||
put {twistcut.s} part V {0.3950000000000000177635684 0.3850000000000000088817842 0.5649999999999999467092948} H {0.0003640000000000000114804 -0.0003699999999999999946917462 -0.0005000000000000000104083409} r_v 0.02800000000000000058286709 r_h 0.02800000000000000058286709
|
||||
put {twisttrc.s} tgc V {0.37255561351776123046875 0.40711653232574462890625 0.57051956653594970703125} H {0.03641721233725547790527344 -0.03706122934818267822265625 -0.0005011741304770112037658691} A {0.01779515855014324188232422 0.01750466972589492797851562 -0.001385415205731987953186035} B {0.001156966434791684150695801 0.0007993413601070642471313477 0.02496042102575302124023438} C {0.0001779512967914342880249023 0.0001750463998178020119667053 -1.385413543175673112273216E-05} D {1.156978123617591336369514E-05 7.993325198185630142688751E-06 0.0002496042288839817047119141}
|
||||
put {xyzpanel.r} comb region yes tree {l xyzcut.c}
|
||||
attr set {xyzpanel.r} {color} {205/253/172} {shader} {glass {tr 0.6}} {region} {R} {region_id} {1003} {material_id} {1} {los} {100}
|
||||
put {twistrcc.s} tgc V {0.4472982883453369140625 0.4472982883453369140625 0.4472982883453369140625} H {0.005773502867668867111206055 0.005773502867668867111206055 0.005773502867668867111206055} A {0 -0.1060660183429718017578125 0.1060660183429718017578125} B {0.1224744841456413269042969 -0.06123724207282066345214844 -0.06123724207282066345214844} C {0 -0.1060660183429718017578125 0.1060660183429718017578125} D {0.1224744841456413269042969 -0.06123724207282066345214844 -0.06123724207282066345214844}
|
||||
put {xycutrcc.s} arb8 V1 {0.4098457992076873779296875 0.330240428447723388671875 -0.03679068386554718017578125} V2 {0.3675903864204883575439453 0.3863152638077735900878906 -0.03679068386160150305741467} V3 {0.3675903864204883575439453 0.3863152638077735900878906 0.03342260420322418212890625} V4 {0.4098457992100617008901509 0.3302404284445723536833839 0.03342260420322418212890625} V5 {0.3537709638476371765136719 0.2879850156605243682861328 -0.03679068386554718017578125} V6 {0.3115155547857284545898438 0.3440598426386713981628418 -0.03679068386160150305741467} V7 {0.3115155547857284545898438 0.3440598426386713981628418 0.03342260420322418212890625} V8 {0.3537709638476371765136719 0.2879850156605243682861328 0.03342260420322418212890625}
|
||||
put {cutdisks.c} comb region no tree {- {- {- {- {- {l disks.c} {l cut0.s}} {l cut1.s}} {l cut2.s}} {l cut3.s}} {l cut4.s}}
|
||||
put {twistcut.s.backu} ell V {0.3945335447788238525390625 0.383843958377838134765625 0.5655720233917236328125} A {0.03095294535160064697265625 -0.0002858481311704963445663452 -0.0002035317302215844392776489} B {0.0002871743054129183292388916 0.03095294535160064697265625 0.0002016565413214266300201416} C {0.0002016565558733418583869934 -0.0002035317156696692109107971 0.03095364384353160858154297}
|
||||
put {xyzring.r} comb region yes tree {u {l xyzringcut.c} {l xyzringtrc.s}}
|
||||
attr set {xyzring.r} {color} {230/253/215} {shader} {mirror {tr .1 re 0.4}} {region} {R} {region_id} {1005} {material_id} {1} {los} {100}
|
||||
put {viewdir.r} comb region yes tree {l viewdir.c}
|
||||
attr set {viewdir.r} {color} {253/227/198} {shader} {phong {tr .1 ri 1.5 sh 2}} {region} {R} {region_id} {1001} {material_id} {1} {los} {100}
|
||||
put {xypanel.r} comb region yes tree {l xycut.c}
|
||||
attr set {xypanel.r} {color} {178/221/243} {shader} {glass {tr 0.6}} {region} {R} {region_id} {1002} {material_id} {1} {los} {100}
|
||||
put {diagram.r} comb region no tree {u {u {u {l arrows.r} {l twistpanel.r}} {u {l twistring.r} {l xypanel.r}}} {u {u {l xyring.r} {l xyzpanel.r}} {u {l xyzring.r} {l viewdir.r}}}}
|
||||
put {viewdir.c} comb region no tree {u {l viewdirrcc.s} {- {- {- {l viewdirtrc.s} {l xrcc.s}} {l yrcc.s}} {l zrcc.s}}}
|
||||
put {arrows.r} comb region yes tree {l coordinates.c}
|
||||
attr set {arrows.r} {color} {217/217/254} {shader} {mirror {tr .1 re 0.4}} {region} {R} {region_id} {1001} {material_id} {1} {los} {100}
|
||||
put {xyring.r} comb region yes tree {u {l xyringcut.c} {l xyringtrc.s}}
|
||||
attr set {xyring.r} {color} {206/230/242} {shader} {mirror {tr .1 re 0.4}} {region} {R} {region_id} {1004} {material_id} {1} {los} {100}
|
||||
put {ground.s} ell V {0 0 -10000.08984375} A {10000 0 0} B {0 6.12303176911188629105709E-13 10000} C {0 -10000 6.12303176911188629105709E-13}
|
||||
put {xyzcut.c} comb region no tree {- {- {- {- {- {- {- {- {- {- {- {l xyzrcc.s} {l cut0.s}} {l cut1.s}} {l cut2.s}} {l cut4.s}} {l xrcc.s}} {l yrcc.s}} {l zrcc.s}} {l viewdirtrc.s}} {l viewdirrcc.s}} {l ringxyztor.s}} {l xyzringtrc.s}}
|
||||
put {ground.r} comb region yes tree {l ground.c}
|
||||
attr set {ground.r} {color} {255/255/255} {shader} {stack {{checker {b {192 192 192} s 8192.0}} {phong {sp 0.8 sh 4 em .5}} }} {region} {R} {region_id} {1001} {material_id} {1} {los} {100}
|
||||
put {xyzrcc.s} tgc V {0.005014000460505485534667969 -0.004998999647796154022216797 7.123547086408665851564592E-19} H {-0.009999999776482582092285156 0.009999999776482582092285156 0} A {-0.356000006198883056640625 -0.356000006198883056640625 0} B {0 0 0.5} C {-0.356000006198883056640625 -0.356000006198883056640625 0} D {0 0 0.5}
|
||||
put {ground.c} comb region no tree {l ground.s}
|
||||
put {disks2.c} comb region no tree {u {- {- {- {- {l xyzrcc.s} {l cut0.s}} {l cut1.s}} {l cut2.s}} {l xyrcc.s}} {- {- {- {l xyrcc.s} {l cut0.s}} {l cut1.s}} {l cut2.s}}}
|
||||
put {light.s} ell V {-98.451141357421875 103.03456878662109375 200.0417633056640625} A {14 0 0} B {0 14 0} C {0 0 14}
|
||||
put {light.r} comb region yes tree {l light.s}
|
||||
attr set {light.r} {color} {255/255/255} {shader} {light {a 270 d {1 0 0} s 16 v 0}} {region} {R} {region_id} {1002} {material_id} {1} {los} {100}
|
||||
put {xyrcc.s} tgc V {0 0 -0.004999999888241291046142578} H {0 0 0.009999999776482582092285156} A {0 -0.5 0} B {0.5 0 0} C {0 -0.5 0} D {0.5 0 0}
|
||||
put {xycut.c} comb region no tree {- {- {- {- {- {- {- {- {- {- {- {l xyrcc.s} {l cut0.s}} {l cut1.s}} {l cut3.s}} {l xrcc.s}} {l yrcc.s}} {l zrcc.s}} {l xyzrcc.s}} {l ringxytor.s}} {l viewdirtrc.s}} {l xyringtrc.s}} {l viewdirrcc.s}}
|
||||
put {disks.c} comb region no tree {u {- {l xyzrcc.s} {l xyrcc.s}} {l xyrcc.s}}
|
||||
put {rings.c} comb region no tree {u {l ringxytor.s} {l ringxyztor.s}}
|
||||
put {ztec.s} tgc V {0 0 1} H {0 0 0.1000000014901161193847656} A {0.02999999932944774627685547 0 0} B {0 0.02999999932944774627685547 0} C {0.0003000000142492353916168213 0 0} D {0 0.0003000000142492353916168213 0}
|
||||
put {ytec.s} tgc V {0 1 0} H {0 0.1000000014901161193847656 0} A {0.02999999932944774627685547 0 0} B {0 0 0.02999999932944774627685547} C {0.0003000000142492353916168213 0 0} D {0 0 0.0003000000142492353916168213}
|
||||
put {xtec.s} tgc V {1 0 0} H {0.1000000014901161193847656 0 0} A {0 0.02999999932944774627685547 0} B {0 0 0.02999999932944774627685547} C {0 0.0003000000142492353916168213 0} D {0 0 0.0003000000142492353916168213}
|
||||
put {zrcc.s} tgc V {0 0 0} H {0 0 1} A {0 -0.009999999776482582092285156 0} B {0.009999999776482582092285156 0 0} C {0 -0.009999999776482582092285156 0} D {0.009999999776482582092285156 0 0}
|
||||
put {yrcc.s} tgc V {0 0 0} H {0 1 0} A {0 0 0.009999999776482582092285156} B {0.009999999776482582092285156 0 0} C {0 0 0.009999999776482582092285156} D {0.009999999776482582092285156 0 0}
|
||||
put {xrcc.s} tgc V {0 0 0} H {1 0 0} A {0 0 -0.009999999776482582092285156} B {0 0.009999999776482582092285156 0} C {0 0 -0.009999999776482582092285156} D {0 0.009999999776482582092285156 0}
|
||||
put {cut4.s} arb8 V1 {1 1 1} V2 {1 -1 1} V3 {-1 -1 1} V4 {-1 1 1} V5 {-1 -1 -1} V6 {-1 -1 -1} V7 {-1 -1 -1} V8 {-1 -1 -1}
|
||||
put {cut3.s} arb8 V1 {1.010072231292724609375 1.0000178813934326171875 1.010089874267578125} V2 {1.010072231292724831419605 1.0000178813934326171875 -1.0000002384185791015625} V3 {-1.0000178813934326171875 -1.010072231292724609375 -1.0000002384185791015625} V4 {-1.0000178813934326171875 -1.010072231292724609375 1.01008987426757901317842} V5 {-1.0000178813934326171875 1.0000178813934326171875 -1.0000002384185791015625} V6 {-1.0000178813934326171875 1.0000178813934326171875 -1.0000002384185791015625} V7 {-1.0000178813934326171875 1.0000178813934326171875 -1.0000002384185791015625} V8 {-1.0000178813934326171875 1.0000178813934326171875 -1.0000002384185791015625}
|
||||
put {cut2.s} arb8 V1 {1 -1 -1.0051000118255615234375} V2 {1 1 -1.0051000118255615234375} V3 {1 1 -0.0051000118255615234375} V4 {1 -1 -0.0051000118255615234375} V5 {-1 -1 -1.0051000118255615234375} V6 {-1 1 -1.0051000118255615234375} V7 {-1 1 -0.0051000118255615234375} V8 {-1 -1 -0.0051000118255615234375}
|
||||
put {cut1.s} arb8 V1 {0 -1 -1} V2 {0 1 -1} V3 {0 1 1} V4 {0 -1 1} V5 {-1 -1 -1} V6 {-1 1 -1} V7 {-1 1 1} V8 {-1 -1 1}
|
||||
put {cut0.s} arb8 V1 {1 -1 -1} V2 {1 0 -1} V3 {1 0 1} V4 {1 -1 1} V5 {-1 -1 -1} V6 {-1 0 -1} V7 {-1 0 1} V8 {-1 -1 1}
|
||||
put {coordinates.c} comb region no tree {u {u {u {u {u {- {- {l xrcc.s} {l yrcc.s}} {l zrcc.s}} {- {- {l yrcc.s} {l xrcc.s}} {l zrcc.s}}} {- {- {l zrcc.s} {l xrcc.s}} {l yrcc.s}}} {l xtec.s}} {l ytec.s}} {l ztec.s}}
|
||||
put {ringxyztor.s} tor V {0 0 0} H {-0.7071067811865475727373109 0.7071067811865475727373109 0} r_a 0.4999999914428644998132256 r_h 0.009999999670806607177109271
|
||||
@@ -1,13 +0,0 @@
|
||||
#!/bin/sh
|
||||
rt -M -p50 -W \
|
||||
$*\
|
||||
aet.g\
|
||||
'diagram.r' \
|
||||
<<EOF
|
||||
viewsize 3.58095758486442e+00;
|
||||
orientation 4.58468551319667e-01 5.46381543126676e-01 5.36927647047512e-01 4.50535790606452e-01;
|
||||
eye_pt 2.16300884070308e+00 6.60866025843505e-01 3.68751836397137e-01;
|
||||
start 0; clean;
|
||||
end;
|
||||
|
||||
EOF
|
||||
@@ -1,191 +0,0 @@
|
||||
title {Annual Gift Man}
|
||||
units in
|
||||
put {body.black.s1} arb8 V1 {228.5999999999999658939487 -228.5999999999999658939487 88.89999999999999147348717} V2 {228.5999999999999658939487 228.5999999999999658939487 88.89999999999999147348717} V3 {228.5999999999999658939487 228.5999999999999658939487 63.49999999999999289457264} V4 {228.5999999999999658939487 -228.5999999999999658939487 63.49999999999999289457264} V5 {-228.5999999999999658939487 -228.5999999999999658939487 88.89999999999999147348717} V6 {-228.5999999999999658939487 228.5999999999999658939487 88.89999999999999147348717} V7 {-228.5999999999999658939487 228.5999999999999658939487 63.49999999999999289457264} V8 {-228.5999999999999658939487 -228.5999999999999658939487 63.49999999999999289457264}
|
||||
put {body.gold.s2} arb8 V1 {228.5999999999999658939487 -38.10000000000000852651283 88.89999999999994884092303} V2 {228.5999999999999658939487 38.10000000000000852651283 88.89999999999994884092303} V3 {228.5999999999999658939487 38.10000000000000852651283 63.49999999999998578914528} V4 {228.5999999999999658939487 -38.10000000000000852651283 63.49999999999998578914528} V5 {177.7999999999999545252649 -38.10000000000000852651283 88.89999999999994884092303} V6 {177.7999999999999545252649 38.10000000000000852651283 88.89999999999994884092303} V7 {177.7999999999999545252649 38.10000000000000852651283 63.49999999999998578914528} V8 {177.7999999999999545252649 -38.10000000000000852651283 63.49999999999998578914528}
|
||||
put {body.gold.s1} arb8 V1 {228.5999999999999943156581 -50.80000000000000426325641 101.5999999999999801048034} V2 {228.5999999999999943156581 50.80000000000000426325641 101.5999999999999801048034} V3 {228.5999999999999943156581 50.80000000000000426325641 50.79999999999999715782906} V4 {228.5999999999999943156581 -50.80000000000000426325641 50.79999999999999715782906} V5 {177.8000000000000113686838 -50.80000000000000426325641 101.5999999999999801048034} V6 {177.8000000000000113686838 50.80000000000000426325641 101.5999999999999801048034} V7 {177.8000000000000113686838 50.80000000000000426325641 50.79999999999999715782906} V8 {177.8000000000000113686838 -50.80000000000000426325641 50.79999999999999715782906}
|
||||
put {body.gold.c} comb region no tree {- {l body.gold.s1} {l body.gold.s2}}
|
||||
put {missile2.s2} tgc V {-117.4750000000000227373675 -277.8124999999999431565811 12.70000000000000284217094} H {-3.110602869834276865189663E-15 0 -25.39999999999999857891453} A {0 9.524999999999998578914528 0} B {-9.524999999999998578914528 0 1.166476076187853824446124E-15} C {0 0.8255000000000000115463195 0} D {-0.8255000000000000115463195 0 1.010945932696140237566435E-16}
|
||||
put {missile1.s2} tgc V {-117.4749999999999943156581 277.8124999999999431565811 12.70000000000000284217094} H {-3.110602869834276865189663E-15 0 -25.39999999999999857891453} A {0 -9.524999999999998578914528 0} B {-9.524999999999998578914528 0 1.166476076187853824446124E-15} C {0 -0.8255000000000000115463195 0} D {-0.8255000000000000115463195 0 1.010945932696140237566435E-16}
|
||||
put {missile2.s1} tgc V {-117.4750000000000227373675 -277.8124999999999431565811 12.70000000000000284217094} H {0 0 101.5999999999999943156581} A {0 9.524999999999998578914528 0} B {9.524999999999998578914528 0 0} C {0 9.524999999999998578914528 0} D {9.524999999999998578914528 0 0}
|
||||
put {missile1.s1} tgc V {-117.4749999999999943156581 277.8124999999999431565811 12.70000000000000284217094} H {0 0 101.5999999999999943156581} A {0 -9.524999999999998578914528 0} B {9.524999999999998578914528 0 0} C {0 -9.524999999999998578914528 0} D {9.524999999999998578914528 0 0}
|
||||
put {rt_leg.s1i2} arb8 V1 {25.40000000000000568434189 -98.42500000000002557953849 -241.2999999999999829469743} V2 {25.40000000000000213162821 -104.7750000000000198951966 -241.2999999999999829469743} V3 {25.40000000000000213162821 -104.7750000000000198951966 -12.7000000000000010658141} V4 {25.40000000000000568434189 -98.42500000000002557953849 -12.7000000000000010658141} V5 {-76.20000000000003126388037 -98.42500000000001136868377 -241.2999999999999829469743} V6 {-76.20000000000003126388037 -104.7750000000000056843419 -241.2999999999999829469743} V7 {-76.20000000000003126388037 -104.7750000000000056843419 -12.7000000000000010658141} V8 {-76.20000000000003126388037 -98.42500000000001136868377 -12.7000000000000010658141}
|
||||
put {lt_leg.s1i2} arb8 V1 {25.40000000000001634248292 98.42500000000002557953849 -241.2999999999999829469743} V2 {25.40000000000001634248292 104.7750000000000198951966 -241.2999999999999829469743} V3 {25.40000000000001634248292 104.7750000000000198951966 -12.7000000000000010658141} V4 {25.40000000000001634248292 98.42500000000002557953849 -12.7000000000000010658141} V5 {-76.20000000000001705302566 98.42500000000002557953849 -241.2999999999999829469743} V6 {-76.20000000000001705302566 104.7750000000000198951966 -241.2999999999999829469743} V7 {-76.20000000000001705302566 104.7750000000000198951966 -12.7000000000000010658141} V8 {-76.20000000000001705302566 98.42500000000002557953849 -12.7000000000000010658141}
|
||||
put {mustache.r} comb region yes tree {n {- {l head.s8} {l head.s1}} {l head.s8i}}
|
||||
attr set {mustache.r} {region} {R} {region_id} {1037} {material_id} {1} {los} {100} {color} {255/255/255}
|
||||
put {button.s6a} tgc V {-228.600000000000051159077 -126.9999999999999715782906 38.10000000000002273736754} H {317.5978069738537215016549 0 328.8821567148312965400692} A {11.41951933037608313270539 0 -11.02770163103658696002185} B {0 -15.87500000000000177635684 0} C {11.41951933037608490906223 0 -11.02770163103658873637869} D {0 -15.87500000000000177635684 0}
|
||||
put {button.r6a} comb region yes tree {- {n {- {l button.s6a} {l button.s6}} {l body.s2a}} {l body.s2}}
|
||||
attr set {button.r6a} {region} {R} {region_id} {1036} {material_id} {1} {los} {100} {color} {255/255/255}
|
||||
put {button.s5a} tgc V {-228.600000000000051159077 -126.9999999999999715782906 38.10000000000002273736754} H {391.8968898810059044990339 0 235.4754078488767561339046} A {8.176229439197108206371922 0 -13.60753089864603637693108} B {0 -15.87500000000000177635684 0} C {8.176229439197108206371922 0 -13.60753089864603637693108} D {0 -15.87500000000000177635684 0}
|
||||
put {button.r5a} comb region yes tree {- {n {- {l button.s5a} {l button.s5}} {l body.s2a}} {l body.s2}}
|
||||
attr set {button.r5a} {region} {R} {region_id} {1035} {material_id} {1} {los} {100} {color} {255/255/255}
|
||||
put {button.s4a} tgc V {-228.600000000000051159077 -126.9999999999999715782906 38.10000000000002273736754} H {439.4888473829994381958386 0 126.0213990795319745075176} A {4.375743023594861114133892 0 -15.26002942302081066827668} B {0 -15.87499999999999822364316 0} C {4.375743023594861114133892 0 -15.26002942302081066827668} D {0 -15.87499999999999822364316 0}
|
||||
put {button.r4a} comb region yes tree {- {n {- {l button.s4a} {l button.s4}} {l body.s2a}} {l body.s2}}
|
||||
attr set {button.r4a} {region} {R} {region_id} {1034} {material_id} {1} {los} {100} {color} {255/255/255}
|
||||
put {button.s3a} tgc V {-228.6000000000000227373675 127 38.10000000000002273736754} H {317.5978069738537215016549 0 328.8821567148312965400692} A {11.41951933037608313270539 0 -11.02770163103658696002185} B {0 15.87500000000000177635684 0} C {11.41951933037608490906223 0 -11.02770163103658873637869} D {0 15.87500000000000177635684 0}
|
||||
put {button.r3a} comb region yes tree {- {n {- {l button.s3a} {l button.s3}} {l body.s2a}} {l body.s2}}
|
||||
attr set {button.r3a} {region} {R} {region_id} {1033} {material_id} {1} {los} {100} {color} {255/255/255}
|
||||
put {button.s2a} tgc V {-228.6000000000000227373675 127 38.10000000000002273736754} H {391.8968898810059044990339 0 235.4754078488767561339046} A {8.176229439197108206371922 0 -13.60753089864603637693108} B {0 15.87500000000000177635684 0} C {8.176229439197108206371922 0 -13.60753089864603637693108} D {0 15.87500000000000177635684 0}
|
||||
put {button.r2a} comb region yes tree {- {n {- {l button.s2a} {l button.s2}} {l body.s2a}} {l body.s2}}
|
||||
attr set {button.r2a} {region} {R} {region_id} {1032} {material_id} {1} {los} {100} {color} {255/255/255}
|
||||
put {button.s1a} tgc V {-228.6000000000000227373675 127 38.10000000000002273736754} H {439.4888473829994381958386 0 126.0213990795319745075176} A {4.375743023594861114133892 0 -15.26002942302081066827668} B {0 15.875 0} C {4.375743023594861114133892 0 -15.26002942302081066827668} D {0 15.875 0}
|
||||
put {button.r1a} comb region yes tree {- {n {- {l button.s1a} {l button.s1}} {l body.s2a}} {l body.s2}}
|
||||
attr set {button.r1a} {region} {R} {region_id} {1031} {material_id} {1} {los} {100} {color} {255/255/255}
|
||||
put {rt_arm.s4i} tgc V {-117.4750000000000227373675 -266.6999999999999886313162 11.11250000000000248689958} H {0 0 114.3000000000000113686838} A {0 23.81249999999999644728632 0} B {23.81249999999999644728632 0 0} C {0 23.81249999999999644728632 0} D {23.81249999999999644728632 0 0}
|
||||
put {lt_arm.s4i} tgc V {-117.4749999999999943156581 266.6999999999999886313162 11.11250000000000248689958} H {0 0 114.3000000000000113686838} A {0 -23.81249999999999644728632 0} B {23.81249999999999644728632 0 0} C {0 -23.81249999999999644728632 0} D {23.81249999999999644728632 0 0}
|
||||
put {missile2.r} comb region yes tree {u {l missile2.s1} {l missile2.s2}}
|
||||
attr set {missile2.r} {region} {R} {region_id} {1024} {material_id} {1} {los} {100} {color} {255/150/50}
|
||||
put {missile1.r} comb region yes tree {u {l missile1.s1} {l missile1.s2}}
|
||||
attr set {missile1.r} {region} {R} {region_id} {1023} {material_id} {1} {los} {100} {color} {255/150/50}
|
||||
put {rt_ear.s2i} arb8 V1 {-104.7750000000000056843419 -152.3999999999999772626325 495.2999999999999545252649} V2 {-104.7750000000000198951966 -203.1999999999999886313162 495.2999999999999545252649} V3 {-104.7750000000000198951966 -203.1999999999999886313162 596.8999999999999772626325} V4 {-104.7750000000000056843419 -152.3999999999999772626325 596.8999999999999772626325} V5 {-130.1750000000000113686838 -152.399999999999948840923 495.2999999999999545252649} V6 {-130.1750000000000113686838 -203.1999999999999602096068 495.2999999999999545252649} V7 {-130.1750000000000113686838 -203.1999999999999602096068 596.8999999999999772626325} V8 {-130.1750000000000113686838 -152.399999999999948840923 596.8999999999999772626325}
|
||||
put {lt_ear.s2i} arb8 V1 {-104.7749999999999914734872 152.3999999999999772626325 495.2999999999999545252649} V2 {-104.7749999999999914734872 203.1999999999999886313162 495.2999999999999545252649} V3 {-104.7749999999999914734872 203.1999999999999886313162 596.8999999999999772626325} V4 {-104.7749999999999914734872 152.3999999999999772626325 596.8999999999999772626325} V5 {-130.1749999999999829469743 152.3999999999999772626325 495.2999999999999545252649} V6 {-130.1749999999999829469743 203.1999999999999886313162 495.2999999999999545252649} V7 {-130.1749999999999829469743 203.1999999999999886313162 596.8999999999999772626325} V8 {-130.1749999999999829469743 152.3999999999999772626325 596.8999999999999772626325}
|
||||
put {rt_leg.s1i} arb8 V1 {25.40000000000000213162821 -123.8250000000000312638804 -241.2999999999999829469743} V2 {25.40000000000000213162821 -130.1750000000000113686838 -241.2999999999999829469743} V3 {25.40000000000000213162821 -130.1750000000000113686838 -12.7000000000000010658141} V4 {25.40000000000000213162821 -123.8250000000000312638804 -12.7000000000000010658141} V5 {-76.20000000000003126388037 -123.8250000000000170530257 -241.2999999999999829469743} V6 {-76.20000000000003126388037 -130.1750000000000113686838 -241.2999999999999829469743} V7 {-76.20000000000003126388037 -130.1750000000000113686838 -12.7000000000000010658141} V8 {-76.20000000000003126388037 -123.8250000000000170530257 -12.7000000000000010658141}
|
||||
put {lt_leg.s1i} arb8 V1 {25.40000000000001634248292 123.8250000000000312638804 -241.2999999999999829469743} V2 {25.40000000000001634248292 130.1750000000000113686838 -241.2999999999999829469743} V3 {25.40000000000001634248292 130.1750000000000113686838 -12.7000000000000010658141} V4 {25.40000000000001634248292 123.8250000000000312638804 -12.7000000000000010658141} V5 {-76.20000000000001705302566 123.8250000000000312638804 -241.2999999999999829469743} V6 {-76.20000000000001705302566 130.1750000000000113686838 -241.2999999999999829469743} V7 {-76.20000000000001705302566 130.1750000000000113686838 -12.7000000000000010658141} V8 {-76.20000000000001705302566 123.8250000000000312638804 -12.7000000000000010658141}
|
||||
put {annual_gift_man} comb region no tree {u {u {u {l body {0.984807753012208 0 -0.17364817766693 75.4019057580597 0 1 0 0 0.17364817766693 0 0.984807753012208 27.1522734574961 0 0 0 1}} {l head {0.984807753012208 0 -0.17364817766693 75.4019057580597 0 1 0 0 0.17364817766693 0 0.984807753012208 27.1522734574961 0 0 0 1}}} {u {l hat {0.984807753012208 0 -0.17364817766693 75.4019057580597 0 1 0 0 0.17364817766693 0 0.984807753012208 27.1522734574961 0 0 0 1}} {l legs {0.984807753012208 0 -0.17364817766693 75.4019057580597 0 1 0 0 0.17364817766693 0 0.984807753012208 27.1522734574961 0 0 0 1}}}} {l arms {0.984807753012208 0 -0.17364817766693 75.4019057580597 0 1 0 0 0.17364817766693 0 0.984807753012208 27.1522734574961 0 0 0 1}}}
|
||||
put {button.s6} tgc V {-228.600000000000051159077 -126.9999999999999715782906 38.10000000000002273736754} H {317.5978069738537215016549 0 328.8821567148312965400692} A {9.135615464300869348335254 0 -8.822161304829272410188423} B {0 -12.69999999999999396038675 0} C {9.135615464300869348335254 0 -8.822161304829272410188423} D {0 -12.69999999999999396038675 0}
|
||||
put {button.r6} comb region yes tree {- {n {l button.s6} {l body.s4i}} {l body.s2}}
|
||||
attr set {button.r6} {region} {R} {region_id} {1010} {material_id} {1} {los} {100}
|
||||
put {button.s5} tgc V {-228.600000000000051159077 -126.9999999999999715782906 38.10000000000002273736754} H {391.8968898810059044990339 0 235.4754078488767561339046} A {6.540983551357687275640274 0 -10.8860247189168308779017} B {0 -12.69999999999999396038675 0} C {6.540983551357687275640274 0 -10.8860247189168308779017} D {0 -12.69999999999999396038675 0}
|
||||
put {button.r5} comb region yes tree {- {n {l button.s5} {l body.s4i}} {l body.s2}}
|
||||
attr set {button.r5} {region} {R} {region_id} {1009} {material_id} {1} {los} {100}
|
||||
put {button.s4} tgc V {-228.600000000000051159077 -126.9999999999999715782906 38.10000000000002273736754} H {439.4888473829994381958386 0 126.0213990795319745075176} A {3.500594418875888624853587 0 -12.20802353841664888989271} B {0 -12.69999999999999396038675 0} C {3.500594418875888624853587 0 -12.20802353841664888989271} D {0 -12.69999999999999396038675 0}
|
||||
put {button.r4} comb region yes tree {- {n {l button.s4} {l body.s4i}} {l body.s2}}
|
||||
attr set {button.r4} {region} {R} {region_id} {1008} {material_id} {1} {los} {100}
|
||||
put {button.s3} tgc V {-228.6000000000000227373675 127 38.10000000000002273736754} H {317.5978069738537215016549 0 328.8821567148312965400692} A {9.135615464300869348335254 0 -8.822161304829272410188423} B {0 12.69999999999999928945726 0} C {9.135615464300869348335254 0 -8.822161304829272410188423} D {0 12.69999999999999928945726 0}
|
||||
put {button.r3} comb region yes tree {- {n {l button.s3} {l body.s4i}} {l body.s2}}
|
||||
attr set {button.r3} {region} {R} {region_id} {1007} {material_id} {1} {los} {100}
|
||||
put {button.s2} tgc V {-228.6000000000000227373675 127 38.10000000000002273736754} H {391.8968898810059044990339 0 235.4754078488767561339046} A {6.540983551357687275640274 0 -10.8860247189168308779017} B {0 12.69999999999999928945726 0} C {6.540983551357687275640274 0 -10.8860247189168308779017} D {0 12.69999999999999928945726 0}
|
||||
put {button.r2} comb region yes tree {- {n {l button.s2} {l body.s4i}} {l body.s2}}
|
||||
attr set {button.r2} {region} {R} {region_id} {1006} {material_id} {1} {los} {100}
|
||||
put {button.s1} tgc V {-228.6000000000000227373675 127 38.10000000000002273736754} H {439.4888473829994381958386 0 126.0213990795319745075176} A {3.500594418875888624853587 0 -12.20802353841664888989271} B {0 12.69999999999999928945726 0} C {3.500594418875888624853587 0 -12.20802353841664888989271} D {0 12.69999999999999928945726 0}
|
||||
put {button.r1} comb region yes tree {- {n {l button.s1} {l body.s4i}} {l body.s2}}
|
||||
attr set {button.r1} {region} {R} {region_id} {1005} {material_id} {1} {los} {100}
|
||||
put {rt_arm.s5} tgc V {-117.4750000000000227373675 -228.5999999999999658939487 304.7999999999999545252649} H {0 -41.27499999999999857891453 0} A {0 0 50.79999999999999715782906} B {50.79999999999999715782906 0 0} C {0 0 50.79999999999999715782906} D {50.79999999999999715782906 0 0}
|
||||
put {lt_arm.s5} tgc V {-117.4749999999999943156581 228.5999999999999943156581 304.7999999999999545252649} H {0 41.27499999999999857891453 0} A {0 0 50.79999999999999715782906} B {50.79999999999999715782906 0 0} C {0 0 50.79999999999999715782906} D {50.79999999999999715782906 0 0}
|
||||
put {rt_arm.s4} tgc V {-117.4750000000000227373675 -266.6999999999999886313162 12.70000000000000284217094} H {0 0 114.2999999999999971578291} A {0 25.39999999999999502620085 0} B {25.39999999999999857891453 0 0} C {0 25.39999999999999502620085 0} D {25.39999999999999857891453 0 0}
|
||||
put {lt_arm.s4} tgc V {-117.4749999999999943156581 266.6999999999999886313162 12.70000000000000284217094} H {0 0 114.2999999999999971578291} A {0 -25.39999999999999502620085 0} B {25.39999999999999857891453 0 0} C {0 -25.39999999999999502620085 0} D {25.39999999999999857891453 0 0}
|
||||
put {rt_arm.s3} arb8 V1 {-79.37500000000002842170943 -228.5999999999999943156581 -101.5999999999999943156581} V2 {-79.37500000000002842170943 -203.1999999999999886313162 -101.5999999999999943156581} V3 {-79.37500000000002842170943 -203.1999999999999886313162 -38.10000000000001563194019} V4 {-79.37500000000002842170943 -228.5999999999999943156581 -25.4000000000000198951966} V5 {-155.5750000000000170530257 -228.5999999999999658939487 -101.5999999999999943156581} V6 {-155.5749999999999602096068 -203.1999999999999602096068 -101.5999999999999801048034} V7 {-155.5750000000000454747351 -203.1999999999999602096068 -38.10000000000001563194019} V8 {-155.5750000000000738964445 -228.5999999999999658939487 -25.400000000000037658765}
|
||||
put {rt_eye.s2} tgc V {-76.19999999999998863131623 -44.44999999999998863131623 603.25} H {50.79999999999999715782906 0 0} A {0 0 -6.349999999999998756550212} B {0 -6.349999999999996980193373 0} C {0 0 -6.349999999999998756550212} D {0 -6.349999999999996980193373 0}
|
||||
put {lt_arm.s3} arb8 V1 {-79.375 228.5999999999999943156581 -101.5999999999999943156581} V2 {-79.375 203.1999999999999886313162 -101.5999999999999943156581} V3 {-79.375 203.1999999999999886313162 -38.10000000000001563194019} V4 {-79.375 228.5999999999999943156581 -25.4000000000000198951966} V5 {-155.5749999999999886313162 228.5999999999999943156581 -101.5999999999999943156581} V6 {-155.5749999999999317878974 203.1999999999999886313162 -101.5999999999999801048034} V7 {-155.5750000000000170530257 203.1999999999999886313162 -38.10000000000001563194019} V8 {-155.5750000000000454747351 228.5999999999999943156581 -25.400000000000037658765}
|
||||
put {rt_arm.r3} comb region yes tree {l rt_arm.gray.s2}
|
||||
attr set {rt_arm.r3} {region} {R} {region_id} {1022} {material_id} {1} {los} {100} {color} {50/50/50}
|
||||
put {rt_arm.s2} arb8 V1 {-79.37500000000002842170943 -228.5999999999999943156581 -101.5999999999999943156581} V2 {-79.37500000000002842170943 -266.6999999999999886313162 -101.5999999999999943156581} V3 {-79.37500000000002842170943 -266.6999999999999886313162 304.7999999999999545252649} V4 {-79.37500000000002842170943 -228.5999999999999943156581 304.7999999999999545252649} V5 {-155.5750000000000170530257 -228.5999999999999658939487 -101.5999999999999943156581} V6 {-155.5750000000000170530257 -266.6999999999999886313162 -101.5999999999999943156581} V7 {-155.5750000000000170530257 -266.6999999999999886313162 304.7999999999999545252649} V8 {-155.5750000000000170530257 -228.5999999999999658939487 304.7999999999999545252649}
|
||||
put {lt_eye.s2} tgc V {-76.19999999999998863131623 44.44999999999999573674359 603.25} H {50.79999999999999715782906 0 0} A {0 0 -6.349999999999998756550212} B {0 6.349999999999999644728632 0} C {0 0 -6.349999999999998756550212} D {0 6.349999999999999644728632 0}
|
||||
put {rt_eye.r2} comb region yes tree {n {l rt_eye.s1} {l rt_eye.s2}}
|
||||
attr set {rt_eye.r2} {region} {R} {region_id} {1030} {material_id} {1} {los} {100} {color} {0/0/0}
|
||||
put {lt_arm.r3} comb region yes tree {l lt_arm.gray.s2}
|
||||
attr set {lt_arm.r3} {region} {R} {region_id} {1021} {material_id} {1} {los} {100} {color} {50/50/50}
|
||||
put {lt_arm.s2} arb8 V1 {-79.375 228.5999999999999943156581 -101.5999999999999943156581} V2 {-79.375 266.6999999999999886313162 -101.5999999999999943156581} V3 {-79.375 266.6999999999999886313162 304.7999999999999545252649} V4 {-79.375 228.5999999999999943156581 304.7999999999999545252649} V5 {-155.5749999999999886313162 228.5999999999999943156581 -101.5999999999999943156581} V6 {-155.5749999999999886313162 266.6999999999999886313162 -101.5999999999999943156581} V7 {-155.5749999999999886313162 266.6999999999999886313162 304.7999999999999545252649} V8 {-155.5749999999999886313162 228.5999999999999943156581 304.7999999999999545252649}
|
||||
put {rt_eye.s1} ell V {-50.80000000000000426325641 -44.44999999999998863131623 603.25} A {19.04999999999999715782906 0 0} B {0 -19.04999999999999715782906 0} C {0 0 19.04999999999999715782906}
|
||||
put {rt_arm.r2} comb region yes tree {n {l rt_arm.c} {l rt_arm.gray.s}}
|
||||
attr set {rt_arm.r2} {region} {R} {region_id} {1019} {material_id} {1} {los} {100} {color} {50/50/50}
|
||||
put {rt_arm.s1} tgc V {-117.4750000000000227373675 -228.5999999999999658939487 304.7999999999999545252649} H {0 -38.09999999999999431565811 0} A {0 0 76.19999999999998863131623} B {76.19999999999998863131623 0 0} C {0 0 76.19999999999998863131623} D {76.19999999999998863131623 0 0}
|
||||
put {lt_eye.r2} comb region yes tree {n {l lt_eye.s1} {l lt_eye.s2}}
|
||||
attr set {lt_eye.r2} {region} {R} {region_id} {1028} {material_id} {1} {los} {100} {color} {0/0/0}
|
||||
put {lt_eye.s1} ell V {-50.79999999999999715782906 44.44999999999999573674359 603.25} A {19.04999999999999715782906 0 0} B {0 19.04999999999999715782906 0} C {0 0 19.04999999999999715782906}
|
||||
put {rt_eye.r1} comb region yes tree {- {l rt_eye.s1} {l rt_eye.s2}}
|
||||
attr set {rt_eye.r1} {region} {R} {region_id} {1029} {material_id} {1} {los} {100} {color} {255/255/255}
|
||||
put {lt_arm.r2} comb region yes tree {n {l lt_arm.c} {l lt_arm.gray.s}}
|
||||
attr set {lt_arm.r2} {region} {R} {region_id} {1020} {material_id} {1} {los} {100} {color} {50/50/50}
|
||||
put {lt_arm.s1} tgc V {-117.4749999999999943156581 228.5999999999999943156581 304.7999999999999545252649} H {0 38.09999999999999431565811 0} A {0 0 76.19999999999998863131623} B {76.19999999999998863131623 0 0} C {0 0 76.19999999999998863131623} D {76.19999999999998863131623 0 0}
|
||||
put {rt_arm.r1} comb region yes tree {- {- {l rt_arm.c} {l rt_arm.gray.s}} {l rt_arm.gray.s2}}
|
||||
attr set {rt_arm.r1} {region} {R} {region_id} {1018} {material_id} {1} {los} {100} {color} {255/0/0}
|
||||
put {lt_eye.r1} comb region yes tree {- {l lt_eye.s1} {l lt_eye.s2}}
|
||||
attr set {lt_eye.r1} {region} {R} {region_id} {1027} {material_id} {1} {los} {100} {color} {255/255/255}
|
||||
put {lt_arm.r1} comb region yes tree {- {- {l lt_arm.c} {l lt_arm.gray.s}} {l lt_arm.gray.s2}}
|
||||
attr set {lt_arm.r1} {region} {R} {region_id} {1017} {material_id} {1} {los} {100} {color} {255/0/0}
|
||||
put {rt_ear.s2} tgc V {-130.1750000000000113686838 -152.3999999999999772626325 546.1000000000000227373675} H {25.39999999999999857891453 0 0} A {0 0 -50.7999999999999900524017} B {0 -50.79999999999997584154698 0} C {0 0 -50.7999999999999900524017} D {0 -50.79999999999997584154698 0}
|
||||
put {lt_ear.s2} tgc V {-130.1749999999999829469743 152.4000000000000056843419 546.1000000000000227373675} H {25.39999999999999857891453 0 0} A {0 0 -50.7999999999999900524017} B {0 50.79999999999999715782906 0} C {0 0 -50.7999999999999900524017} D {0 50.79999999999999715782906 0}
|
||||
put {rt_ear.s1} arb8 V1 {-104.7750000000000056843419 -76.19999999999997442046151 533.3999999999999772626325} V2 {-104.7750000000000056843419 -152.4000000000000056843419 533.3999999999999772626325} V3 {-104.7750000000000056843419 -152.4000000000000056843419 558.7999999999999545252649} V4 {-104.7750000000000056843419 -76.19999999999997442046151 558.7999999999999545252649} V5 {-130.1749999999999829469743 -76.19999999999997442046151 533.3999999999999772626325} V6 {-130.1750000000000113686838 -152.3999999999999772626325 533.3999999999999772626325} V7 {-130.1750000000000113686838 -152.3999999999999772626325 558.7999999999999545252649} V8 {-130.1749999999999829469743 -76.19999999999997442046151 558.7999999999999545252649}
|
||||
put {rt_leg.s3} tgc V {-25.40000000000001278976924 -101.5999999999999943156581 -12.69999999999999928945726} H {0 -25.39999999999998792077349 0} A {0 0 76.19999999999997442046151} B {76.19999999999998863131623 0 0} C {0 0 76.19999999999997442046151} D {76.19999999999998863131623 0 0}
|
||||
put {lt_ear.s1} arb8 V1 {-104.7749999999999914734872 76.19999999999998863131623 533.3999999999999772626325} V2 {-104.7749999999999914734872 152.4000000000000056843419 533.3999999999999772626325} V3 {-104.7749999999999914734872 152.4000000000000056843419 558.7999999999999545252649} V4 {-104.7749999999999914734872 76.19999999999998863131623 558.7999999999999545252649} V5 {-130.1749999999999829469743 76.19999999999998863131623 533.3999999999999772626325} V6 {-130.1749999999999829469743 152.4000000000000056843419 533.3999999999999772626325} V7 {-130.1749999999999829469743 152.4000000000000056843419 558.7999999999999545252649} V8 {-130.1749999999999829469743 76.19999999999998863131623 558.7999999999999545252649}
|
||||
put {lt_leg.s3} tgc V {-25.39999999999999857891453 101.5999999999999943156581 -12.69999999999999928945726} H {0 25.39999999999999857891453 0} A {0 0 76.19999999999997442046151} B {76.19999999999998863131623 0 0} C {0 0 76.19999999999997442046151} D {76.19999999999998863131623 0 0}
|
||||
put {rt_leg.r3} comb region yes tree {n {l rt_leg.c} {l rt_leg.black.s}}
|
||||
attr set {rt_leg.r3} {region} {R} {region_id} {1014} {material_id} {1} {los} {100} {color} {0/0/0}
|
||||
put {rt_leg.s2} arb8 V1 {76.19999999999998863131623 -76.20000000000000284217094 -317.4999999999999431565811} V2 {76.19999999999994599875208 -152.3999999999999772626325 -317.4999999999999431565811} V3 {101.5999999999999801048034 -165.100000000000051159077 -355.5999999999999090505298} V4 {101.6000000000000369482223 -63.50000000000000710542736 -355.5999999999999090505298} V5 {-126.9999999999999857891453 -76.19999999999990336618794 -317.4999999999998863131623} V6 {-126.9999999999999857891453 -152.399999999999948840923 -317.4999999999999431565811} V7 {-127.0000000000000284217094 -165.0999999999999943156581 -355.5999999999999090505298} V8 {-127.0000000000000426325641 -63.49999999999993605115378 -355.5999999999999090505298}
|
||||
put {lt_leg.r3} comb region yes tree {n {l lt_leg.c} {l lt_leg.black.s}}
|
||||
attr set {lt_leg.r3} {region} {R} {region_id} {1013} {material_id} {1} {los} {100} {color} {0/0/0}
|
||||
put {lt_leg.s2} arb8 V1 {76.20000000000000284217094 76.19999999999998863131623 -317.4999999999999431565811} V2 {76.1999999999999602096068 152.3999999999999772626325 -317.4999999999999431565811} V3 {101.5999999999999943156581 165.100000000000051159077 -355.5999999999999090505298} V4 {101.600000000000051159077 63.49999999999999289457264 -355.5999999999999090505298} V5 {-126.9999999999999715782906 76.19999999999991757704265 -317.4999999999998863131623} V6 {-126.9999999999999715782906 152.3999999999999772626325 -317.4999999999999431565811} V7 {-127.0000000000000142108547 165.1000000000000227373675 -355.5999999999999090505298} V8 {-127.0000000000000284217094 63.4999999999999502620085 -355.5999999999999090505298}
|
||||
put {rt_leg.r2} comb region yes tree {n {l rt_leg.c} {l rt_leg.white.s}}
|
||||
attr set {rt_leg.r2} {region} {R} {region_id} {1015} {material_id} {1} {los} {100} {color} {255/255/255}
|
||||
put {rt_leg.s1} arb8 V1 {50.79999999999998294697434 -101.5999999999999943156581 -317.5} V2 {50.79999999999998294697434 -127 -317.5} V3 {50.79999999999998294697434 -127 -12.69999999999999928945726} V4 {50.79999999999998294697434 -101.5999999999999943156581 -12.69999999999999928945726} V5 {-101.6000000000000085265128 -101.5999999999999801048034 -317.5} V6 {-101.6000000000000085265128 -126.9999999999999857891453 -317.5} V7 {-101.6000000000000085265128 -126.9999999999999857891453 -12.69999999999999928945726} V8 {-101.6000000000000085265128 -101.5999999999999801048034 -12.69999999999999928945726}
|
||||
put {lt_leg.r2} comb region yes tree {n {l lt_leg.c} {l lt_leg.white.s}}
|
||||
attr set {lt_leg.r2} {region} {R} {region_id} {1012} {material_id} {1} {los} {100} {color} {255/255/255}
|
||||
put {lt_leg.s1} arb8 V1 {50.79999999999999715782906 101.5999999999999943156581 -317.5} V2 {50.79999999999999715782906 127 -317.5} V3 {50.79999999999999715782906 127 -12.69999999999999928945726} V4 {50.79999999999999715782906 101.5999999999999943156581 -12.69999999999999928945726} V5 {-101.5999999999999943156581 101.5999999999999943156581 -317.5} V6 {-101.5999999999999943156581 127 -317.5} V7 {-101.5999999999999943156581 127 -12.69999999999999928945726} V8 {-101.5999999999999943156581 101.5999999999999943156581 -12.69999999999999928945726}
|
||||
put {rt_leg.r1} comb region yes tree {- {- {- {- {l rt_leg.c} {l rt_leg.white.s}} {l rt_leg.black.s}} {l rt_leg.s1i}} {l rt_leg.s1i2}}
|
||||
attr set {rt_leg.r1} {region} {R} {region_id} {1016} {material_id} {1} {los} {100} {color} {255/0/0}
|
||||
put {lt_leg.r1} comb region yes tree {- {- {- {- {l lt_leg.c} {l lt_leg.white.s}} {l lt_leg.black.s}} {l lt_leg.s1i}} {l lt_leg.s1i2}}
|
||||
attr set {lt_leg.r1} {region} {R} {region_id} {1011} {material_id} {1} {los} {100} {color} {255/0/0}
|
||||
put {body.s3i2} arb8 V1 {-6.151326253166899959978764 231.3729373086425198380311 390.9270626913569799398829} V2 {-6.151326253166907065406122 175.6740115273925368910568 446.6259884726068776217289} V3 {-6.151326253166899959978764 222.1160604959457600671158 493.068037441160242906335} V4 {-6.151326253166892854551406 277.8149862771957714357995 437.369111659910345224489} V5 {-231.13999999999995793587 231.37293730864257668145 390.9270626913569799398829} V6 {-231.13999999999995793587 175.6740115273925653127662 446.6259884726068776217289} V7 {-231.13999999999995793587 222.1160604959457884888252 493.068037441160242906335} V8 {-231.13999999999995793587 277.8149862771958282792184 437.369111659910345224489}
|
||||
put {body.s3i1} arb8 V1 {-6.151326253166928381688194 -231.37293730864257668145 390.9270626913570367833017} V2 {-6.151326253166928381688194 -175.6740115273925368910568 446.6259884726068776217289} V3 {-6.151326253166928381688194 -222.1160604959457600671158 493.068037441160242906335} V4 {-6.151326253166928381688194 -277.8149862771958282792184 437.369111659910345224489} V5 {-231.1399999999999863575795 -231.37293730864257668145 390.9270626913570367833017} V6 {-231.1399999999999863575795 -175.6740115273925368910568 446.6259884726068776217289} V7 {-231.1399999999999863575795 -222.1160604959457600671158 493.068037441160242906335} V8 {-231.1399999999999863575795 -277.8149862771958282792184 437.369111659910345224489}
|
||||
put {rt_ear.r} comb region yes tree {u {l rt_ear.s1} {n {l rt_ear.s2} {l rt_ear.s2i}}}
|
||||
attr set {rt_ear.r} {region} {R} {region_id} {1026} {material_id} {1} {los} {100} {color} {50/50/50}
|
||||
put {lt_ear.r} comb region yes tree {u {l lt_ear.s1} {n {l lt_ear.s2} {l lt_ear.s2i}}}
|
||||
attr set {lt_ear.r} {region} {R} {region_id} {1025} {material_id} {1} {los} {100} {color} {50/50/50}
|
||||
put {rt_arm.c} comb region no tree {u {u {u {u {l rt_arm.s1} {l rt_arm.s2}} {l rt_arm.s3}} {- {l rt_arm.s4} {l rt_arm.s4i}}} {l rt_arm.s5}}
|
||||
put {lt_arm.c} comb region no tree {u {u {u {u {l lt_arm.s1} {l lt_arm.s2}} {l lt_arm.s3}} {- {l lt_arm.s4} {l lt_arm.s4i}}} {l lt_arm.s5}}
|
||||
put {rt_leg.c} comb region no tree {u {u {l rt_leg.s1} {l rt_leg.s2}} {l rt_leg.s3}}
|
||||
put {lt_leg.c} comb region no tree {u {u {l lt_leg.s1} {l lt_leg.s2}} {l lt_leg.s3}}
|
||||
put {body.s4i} tgc V {-228.6000000000000227373675 -228.5999999999999943156581 38.09999999999999431565811} H {0 457.1999999999999886313162 0} A {0 0 381.0000000000000568434189} B {457.1999999999999886313162 0 0} C {0 0 381.0000000000000568434189} D {457.1999999999999886313162 0 0}
|
||||
put {body.s2i} arb8 V1 {228.5999999999999943156581 -228.5999999999999943156581 342.8999999999999772626325} V2 {228.5999999999999943156581 228.5999999999999943156581 342.8999999999999772626325} V3 {228.5999999999999943156581 228.5999999999999943156581 38.09999999999999431565811} V4 {228.5999999999999943156581 -228.5999999999999943156581 38.09999999999999431565811} V5 {-228.5999999999999943156581 -228.5999999999999943156581 342.8999999999999772626325} V6 {-228.5999999999999943156581 228.5999999999999943156581 342.8999999999999772626325} V7 {-228.5999999999999943156581 228.5999999999999943156581 38.09999999999999431565811} V8 {-228.5999999999999943156581 -228.5999999999999943156581 38.09999999999999431565811}
|
||||
put {buttons} comb region no tree {u {u {u {u {l button.r1} {l button.r1a}} {u {l button.r2} {l button.r2a}}} {u {u {l button.r3} {l button.r3a}} {u {l button.r4} {l button.r4a}}}} {u {u {l button.r5} {l button.r5a}} {u {l button.r6} {l button.r6a}}}}
|
||||
attr set {buttons} {color} {0/255/0}
|
||||
put {head.s9i} arb8 V1 {-98.42500000000002557953849 -76.1999999999999602096068 514.3499999999996816768544} V2 {-98.42500000000002557953849 76.1999999999999602096068 514.3499999999996816768544} V3 {-98.42500000000002557953849 76.1999999999999602096068 457.2000000000000454747351} V4 {-98.42500000000002557953849 -76.1999999999999602096068 457.2000000000000454747351} V5 {-9.525000000000012789769244 -76.1999999999999602096068 514.3499999999996816768544} V6 {-9.525000000000012789769244 76.1999999999999602096068 514.3499999999996816768544} V7 {-9.525000000000012789769244 76.1999999999999602096068 457.2000000000000454747351} V8 {-9.525000000000012789769244 -76.1999999999999602096068 457.2000000000000454747351}
|
||||
put {body.s2a} tgc V {-228.6000000000000227373675 -228.5999999999999943156581 38.09999999999999431565811} H {0 457.1999999999999886313162 0} A {0 0 361.9499999999999886313162} B {438.1499999999999772626325 0 0} C {0 0 361.9500000000000454747351} D {438.1499999999999772626325 0 0}
|
||||
put {head.s8i} arb8 V1 {-98.42500000000001136868377 -69.84999999999999431565811 514.3499999999997953636921} V2 {-98.42500000000001136868377 69.84999999999999431565811 514.3499999999997953636921} V3 {-98.42500000000001136868377 25.39999999999999857891453 546.1000000000000227373675} V4 {-98.42500000000001136868377 -25.39999999999999857891453 546.1000000000000227373675} V5 {-9.525000000000019895196601 -69.85000000000027853275242 514.3499999999994543031789} V6 {-9.525000000000019895196601 69.85000000000027853275242 514.3499999999995679900167} V7 {-9.525000000000019895196601 25.40000000000017266188479 546.1000000000000227373675} V8 {-9.525000000000019895196601 -25.40000000000007673861546 546.1000000000000227373675}
|
||||
put {head.s7i} arb8 V1 {-98.42500000000001136868377 -63.49999999999999289457264 514.3499999999997953636921} V2 {-98.42500000000001136868377 63.49999999999999289457264 514.3499999999997953636921} V3 {-98.42500000000001136868377 63.49999999999999289457264 463.5499999999998408384272} V4 {-98.42500000000001136868377 -63.49999999999999289457264 463.5499999999998408384272} V5 {-9.525000000000019895196601 -63.49999999999999289457264 514.3499999999997953636921} V6 {-9.525000000000019895196601 63.49999999999999289457264 514.3499999999997953636921} V7 {-9.525000000000019895196601 63.49999999999999289457264 463.5499999999998408384272} V8 {-9.525000000000019895196601 -63.49999999999999289457264 463.5499999999998408384272}
|
||||
put {head.s4i} arb8 V1 {-3.110602869834276076328758E-15 -25.39999999999999502620085 587.3749999999998863131623} V2 {-7.776507174585689796391442E-15 -63.49999999999998578914528 587.3749999999998863131623} V3 {-7.776507174585689796391442E-15 -63.49999999999998578914528 619.125} V4 {-3.110602869834276076328758E-15 -25.39999999999999502620085 619.125} V5 {-50.7999999999999900524017 -25.39999999999998792077349 587.3749999999998863131623} V6 {-50.79999999999999715782906 -63.49999999999997868371793 587.3749999999998863131623} V7 {-50.79999999999999715782906 -63.49999999999997868371793 619.125} V8 {-50.7999999999999900524017 -25.39999999999998792077349 619.125}
|
||||
put {head.s3i} arb8 V1 {0 25.39999999999999502620085 587.3749999999998863131623} V2 {0 63.49999999999998578914528 587.3749999999998863131623} V3 {0 63.49999999999998578914528 619.125} V4 {0 25.39999999999999502620085 619.125} V5 {-50.7999999999999900524017 25.39999999999999502620085 587.3749999999998863131623} V6 {-50.7999999999999900524017 63.49999999999998578914528 587.3749999999998863131623} V7 {-50.7999999999999900524017 63.49999999999998578914528 619.125} V8 {-50.7999999999999900524017 25.39999999999999502620085 619.125}
|
||||
put {head.s2i} arb8 V1 {-98.42500000000001136868377 -107.9499999999999886313162 527.0499999999998408384272} V2 {-98.42500000000001136868377 107.9499999999999886313162 527.0499999999998408384272} V3 {-98.42500000000001136868377 107.9499999999999886313162 565.1499999999998635757947} V4 {-98.42500000000001136868377 -107.9499999999999886313162 565.1499999999998635757947} V5 {-136.5249999999999772626325 -107.9499999999999886313162 527.0499999999998408384272} V6 {-136.5249999999999772626325 107.9499999999999886313162 527.0499999999998408384272} V7 {-136.5249999999999772626325 107.9499999999999886313162 565.1499999999998635757947} V8 {-136.5249999999999772626325 -107.9499999999999886313162 565.1499999999998635757947}
|
||||
put {head.s1i} tgc V {-117.4749999999999943156581 0 444.5} H {0 0 203.2000000000000454747351} A {0 -100.0125000000000028421709 0} B {100.0125000000000170530257 0 0} C {0 -100.0125000000000028421709 0} D {100.0125000000000170530257 0 0}
|
||||
put {beard.r} comb region yes tree {- {n {- {l head.s8} {l head.s1}} {l head.s9}} {l head.s9i}}
|
||||
attr set {beard.r} {region} {R} {region_id} {1038} {material_id} {1} {los} {100} {color} {255/255/255}
|
||||
put {body.s5} arb8 V1 {31.75 -25.39999999999999857891453 444.5} V2 {31.75 25.39999999999999857891453 444.5} V3 {31.75 25.39999999999999857891453 342.8999999999999772626325} V4 {31.75 -25.39999999999999857891453 342.8999999999999772626325} V5 {-228.5999999999999943156581 -25.39999999999999857891453 444.5} V6 {-228.5999999999999943156581 25.39999999999999857891453 444.5} V7 {-228.5999999999999943156581 25.39999999999999857891453 342.8999999999999772626325} V8 {-228.5999999999999943156581 -25.39999999999999857891453 342.8999999999999772626325}
|
||||
put {body.s4} arb8 V1 {228.5999999999999943156581 -25.39999999999999857891453 38.09999999999999431565811} V2 {228.5999999999999943156581 25.39999999999999857891453 38.09999999999999431565811} V3 {228.5999999999999943156581 25.39999999999999857891453 342.8999999999999772626325} V4 {228.5999999999999943156581 -25.39999999999999857891453 342.8999999999999772626325} V5 {-228.5999999999999943156581 -25.39999999999999857891453 38.09999999999999431565811} V6 {-228.5999999999999943156581 25.39999999999999857891453 38.09999999999999431565811} V7 {-228.5999999999999943156581 25.39999999999999857891453 342.8999999999999772626325} V8 {-228.5999999999999943156581 -25.39999999999999857891453 342.8999999999999772626325}
|
||||
put {body.r4} comb region yes tree {u {- {n {l body.c} {l body.white.s1}} {l body.gold.s1}} {- {n {l body.c} {l body.white.s2}} {l body.gold.s1}}}
|
||||
attr set {body.r4} {region} {R} {region_id} {1000} {material_id} {1} {los} {100} {color} {255/255/255}
|
||||
put {body.s3} arb8 V1 {-6.349999999999999644728632 -228.600000000000051159077 342.8999999999998635757947} V2 {-6.349999999999999644728632 228.600000000000051159077 342.8999999999998635757947} V3 {-6.349999999999999644728632 228.600000000000051159077 444.5000000000000568434189} V4 {-6.349999999999999644728632 -228.600000000000051159077 444.5000000000000568434189} V5 {-228.6000000000000795807864 -228.600000000000051159077 342.8999999999998635757947} V6 {-228.6000000000000795807864 228.600000000000051159077 342.8999999999998635757947} V7 {-228.6000000000000795807864 228.600000000000051159077 444.5000000000000568434189} V8 {-228.6000000000000795807864 -228.600000000000051159077 444.5000000000000568434189}
|
||||
put {body.r3} comb region yes tree {n {l body.c} {l body.gold.c}}
|
||||
attr set {body.r3} {region} {R} {region_id} {1000} {material_id} {1} {los} {100} {color} {255/215/0}
|
||||
put {body.s2} tgc V {-228.6000000000000227373675 -228.5999999999999943156581 38.09999999999999431565811} H {0 457.1999999999999886313162 0} A {0 0 355.5999999999999658939487} B {431.7999999999998976818461 0 0} C {0 0 355.5999999999999658939487} D {431.7999999999998976818461 0 0}
|
||||
put {body.r2} comb region yes tree {- {n {l body.c} {l body.black.s1}} {l body.gold.c}}
|
||||
attr set {body.r2} {region} {R} {region_id} {1000} {material_id} {1} {los} {100} {color} {0/0/0}
|
||||
put {body.s1} arb8 V1 {228.5999999999999658939487 -228.5999999999999658939487 -12.69999999999999928945726} V2 {228.5999999999999658939487 228.5999999999999658939487 -12.69999999999999928945726} V3 {228.5999999999999658939487 228.5999999999999658939487 38.09999999999999431565811} V4 {228.5999999999999658939487 -228.5999999999999658939487 38.09999999999999431565811} V5 {-228.5999999999999658939487 -228.5999999999999658939487 -12.69999999999999928945726} V6 {-228.5999999999999658939487 228.5999999999999658939487 -12.69999999999999928945726} V7 {-228.5999999999999658939487 228.5999999999999658939487 38.09999999999999431565811} V8 {-228.5999999999999658939487 -228.5999999999999658939487 38.09999999999999431565811}
|
||||
put {body.r1} comb region yes tree {- {- {- {- {l body.c} {l body.white.s1}} {l body.white.s2}} {l body.black.s1}} {l body.gold.s1}}
|
||||
attr set {body.r1} {region} {R} {region_id} {1000} {material_id} {1} {los} {100} {color} {255/0/0}
|
||||
put {head.s9} arb8 V1 {-98.42500000000001136868377 -88.89999999999997726263246 514.3499999999996816768544} V2 {-98.42500000000001136868377 88.89999999999997726263246 514.3499999999996816768544} V3 {-98.42500000000001136868377 88.89999999999997726263246 444.4999999999998863131623} V4 {-98.42500000000001136868377 -88.89999999999997726263246 444.4999999999998863131623} V5 {-9.525000000000016342482922 -88.89999999999997726263246 514.3499999999996816768544} V6 {-9.525000000000016342482922 88.89999999999997726263246 514.3499999999996816768544} V7 {-9.525000000000016342482922 88.89999999999997726263246 444.4999999999998863131623} V8 {-9.525000000000016342482922 -88.89999999999997726263246 444.4999999999998863131623}
|
||||
put {head.s8} tgc V {-117.4749999999999943156581 0 444.5} H {0 0 203.1999999999999886313162} A {0 -107.9499999999999886313162 0} B {107.9499999999999744204615 0 0} C {0 -107.9499999999999886313162 0} D {107.9499999999999744204615 0 0}
|
||||
put {head.s6} ell V {-15.875 0 546.1000000000000227373675} A {25.39999999999999857891453 0 0} B {0 25.39999999999999857891453 0} C {0 0 6.349999999999999644728632}
|
||||
put {head.s5} tgc V {-15.875 0 546.1000000000000227373675} H {0 0 69.84999999999999431565811} A {0 -25.39999999999999857891453 0} B {25.39999999999999857891453 0 0} C {0 -1.587499999999999911182158 0} D {1.587499999999999911182158 0 0}
|
||||
put {head.s1} tgc V {-117.4749999999999943156581 0 444.5} H {0 0 203.1999999999999886313162} A {0 -101.6000000000000085265128 0} B {101.6000000000000227373675 0 0} C {0 -101.6000000000000085265128 0} D {101.6000000000000227373675 0 0}
|
||||
put {head.r1} comb region yes tree {u {u {- {- {- {- {- {l head.s1} {l head.s1i}} {l head.s2i}} {l head.s3i}} {l head.s4i}} {l head.s7i}} {l head.s5}} {l head.s6}}
|
||||
attr set {head.r1} {region} {R} {region_id} {1002} {material_id} {1} {los} {100} {color} {50/50/50}
|
||||
put {rt_arm} comb region no tree {u {u {l rt_arm.r1} {l rt_arm.r2}} {u {l rt_arm.r3} {l missile2.r}}}
|
||||
put {lt_arm} comb region no tree {u {u {l lt_arm.r1} {l lt_arm.r2}} {u {l lt_arm.r3} {l missile1.r}}}
|
||||
put {rt_leg} comb region no tree {u {u {l rt_leg.r1} {l rt_leg.r2}} {l rt_leg.r3}}
|
||||
put {lt_leg} comb region no tree {u {u {l lt_leg.r1} {l lt_leg.r2}} {l lt_leg.r3}}
|
||||
put {rt_leg.white.s} arb8 V1 {127 -1.555301434917138590367013E-14 -253.9999999999999147348717} V2 {126.9999999999999715782906 -203.2000000000001023181539 -253.9999999999999147348717} V3 {126.9999999999999715782906 -203.2000000000001023181539 -279.3999999999999204192136} V4 {127 -1.555301434917138590367013E-14 -279.3999999999999204192136} V5 {-152.3999999999999772626325 1.866361721900566119113798E-14 -253.9999999999999147348717} V6 {-152.4000000000000056843419 -203.2000000000000454747351 -253.9999999999999147348717} V7 {-152.4000000000000056843419 -203.2000000000000454747351 -279.3999999999999204192136} V8 {-152.3999999999999772626325 1.866361721900566119113798E-14 -279.3999999999999204192136}
|
||||
put {lt_leg.white.s} arb8 V1 {127 0 -253.9999999999999147348717} V2 {127 203.2000000000000738964445 -253.9999999999999147348717} V3 {127 203.2000000000000738964445 -279.3999999999999204192136} V4 {127 0 -279.3999999999999204192136} V5 {-152.3999999999999772626325 0 -253.9999999999999147348717} V6 {-152.3999999999999772626325 203.2000000000000738964445 -253.9999999999999147348717} V7 {-152.3999999999999772626325 203.2000000000000738964445 -279.3999999999999204192136} V8 {-152.3999999999999772626325 0 -279.3999999999999204192136}
|
||||
put {body.c} comb region no tree {u {u {u {u {l body.s1} {n {l body.s2} {l body.s2i}}} {- {- {l body.s3} {l body.s3i1}} {l body.s3i2}}} {n {l body.s4} {l body.s4i}}} {l body.s5}}
|
||||
put {hat.s3} ell V {-117.4749999999999943156581 0 889} A {38.09999999999999431565811 0 0} B {0 38.09999999999999431565811 0} C {0 0 38.09999999999999431565811}
|
||||
put {hat.r3} comb region yes tree {l hat.s3}
|
||||
attr set {hat.r3} {region} {R} {region_id} {1004} {material_id} {1} {los} {100} {color} {255/255/255}
|
||||
put {hat.s2} tgc V {-117.4749999999999943156581 0 685.8000000000000682121026} H {0 0 203.1999999999999886313162} A {0 -101.5999999999999943156581 0} B {101.5999999999999943156581 0 0} C {0 -12.69999999999999928945726 0} D {12.69999999999999928945726 0 0}
|
||||
put {hat.r2} comb region yes tree {l hat.s2}
|
||||
attr set {hat.r2} {region} {R} {region_id} {1003} {material_id} {1} {los} {100} {color} {255/0/0}
|
||||
put {hat.s1} tgc V {-117.4749999999999943156581 0 647.7000000000000454747351} H {0 0 38.09999999999999431565811} A {0 -114.2999999999999829469743 0} B {114.2999999999999829469743 0 0} C {0 -114.2999999999999829469743 0} D {114.2999999999999829469743 0 0}
|
||||
put {hat.r1} comb region yes tree {l hat.s1}
|
||||
attr set {hat.r1} {region} {R} {region_id} {1001} {material_id} {1} {los} {100} {color} {255/255/255}
|
||||
put {rt_leg.black.s} arb8 V1 {127 -1.555301434917138590367013E-14 -355.5999999999999090505298} V2 {126.9999999999999715782906 -203.2000000000001023181539 -355.5999999999999090505298} V3 {126.9999999999999715782906 -203.2000000000001023181539 -279.3999999999999204192136} V4 {127 -1.555301434917138590367013E-14 -279.3999999999999204192136} V5 {-152.3999999999999772626325 1.866361721900566119113798E-14 -355.5999999999999090505298} V6 {-152.4000000000000056843419 -203.2000000000000454747351 -355.5999999999999090505298} V7 {-152.4000000000000056843419 -203.2000000000000454747351 -279.3999999999999204192136} V8 {-152.3999999999999772626325 1.866361721900566119113798E-14 -279.3999999999999204192136}
|
||||
put {lt_leg.black.s} arb8 V1 {127 0 -355.5999999999999090505298} V2 {127 203.2000000000000738964445 -355.5999999999999090505298} V3 {127 203.2000000000000738964445 -279.3999999999999204192136} V4 {127 0 -279.3999999999999204192136} V5 {-152.3999999999999772626325 0 -355.5999999999999090505298} V6 {-152.3999999999999772626325 203.2000000000000738964445 -355.5999999999999090505298} V7 {-152.3999999999999772626325 203.2000000000000738964445 -279.3999999999999204192136} V8 {-152.3999999999999772626325 0 -279.3999999999999204192136}
|
||||
put {rt_arm.gray.s2} tgc V {-117.4750000000000227373675 -228.5999999999999658939487 304.7999999999999545252649} H {0 -41.27499999999999857891453 0} A {0 0 25.39999999999999857891453} B {25.39999999999999857891453 0 0} C {0 0 25.39999999999999857891453} D {25.39999999999999857891453 0 0}
|
||||
put {lt_arm.gray.s2} tgc V {-117.4749999999999943156581 228.5999999999999943156581 304.7999999999999545252649} H {0 41.27499999999999857891453 0} A {0 0 25.39999999999999857891453} B {25.39999999999999857891453 0 0} C {0 0 25.39999999999999857891453} D {25.39999999999999857891453 0 0}
|
||||
put {arms} comb region no tree {u {l lt_arm {-0.5 0 -0.866025403784439 87.752043073497 0 1 0 0 0.866025403784439 0 -0.5 558.936334309577 0 0 0 1}} {l rt_arm {-0.17364817766693 0 -0.984807753012208 162.295083446698 0 1 0 0 0.984807753012208 0 -0.17364817766693 473.418255337989 0 0 0 1}}}
|
||||
put {eyes} comb region no tree {u {u {l lt_eye.r1} {l lt_eye.r2}} {u {l rt_eye.r1} {l rt_eye.r2}}}
|
||||
put {body} comb region no tree {u {u {u {l body.r1} {l body.r2}} {u {l body.r3} {l body.r4}}} {l buttons}}
|
||||
put {legs} comb region no tree {u {l lt_leg {0.707106781186548 0 -0.707106781186547 -16.4197438789308 0 1 0 0 0.707106781186547 0 0.707106781186548 14.2407683632075 0 0 0 1}} {l rt_leg {0.984807753012208 0 0.17364817766693 1.8194487828801 0 1 0 0 -0.17364817766693 0 0.984807753012208 -4.60360524948499 0 0 0 1}}}
|
||||
put {head} comb region no tree {u {u {u {l head.r1} {l lt_ear.r}} {u {l rt_ear.r} {l eyes}}} {u {l mustache.r} {l beard.r}}}
|
||||
put {hat} comb region no tree {u {u {l hat.r1} {l hat.r2}} {l hat.r3}}
|
||||
put {rt_arm.gray.s} arb8 V1 {-76.20000000000001705302566 -177.7999999999999545252649 -12.69999999999999928945726} V2 {-76.20000000000001705302566 -279.3999999999999772626325 -12.69999999999999928945726} V3 {-76.20000000000001705302566 -279.3999999999999772626325 -114.2999999999999971578291} V4 {-76.20000000000001705302566 -177.7999999999999545252649 -114.2999999999999971578291} V5 {-165.1000000000000227373675 -177.7999999999999261035555 -12.69999999999999928945726} V6 {-165.1000000000000227373675 -279.3999999999999772626325 -12.69999999999999928945726} V7 {-165.1000000000000227373675 -279.3999999999999772626325 -114.2999999999999971578291} V8 {-165.1000000000000227373675 -177.7999999999999261035555 -114.2999999999999971578291}
|
||||
put {lt_arm.gray.s} arb8 V1 {-76.19999999999998863131623 177.7999999999999545252649 -12.69999999999999928945726} V2 {-76.19999999999998863131623 279.3999999999999772626325 -12.69999999999999928945726} V3 {-76.19999999999998863131623 279.3999999999999772626325 -114.2999999999999971578291} V4 {-76.19999999999998863131623 177.7999999999999545252649 -114.2999999999999971578291} V5 {-165.0999999999999943156581 177.7999999999999545252649 -12.69999999999999928945726} V6 {-165.0999999999999943156581 279.3999999999999772626325 -12.69999999999999928945726} V7 {-165.0999999999999943156581 279.3999999999999772626325 -114.2999999999999971578291} V8 {-165.0999999999999943156581 177.7999999999999545252649 -114.2999999999999971578291}
|
||||
put {body.white.s2} arb8 V1 {228.6000000000000227373675 -25.39999999999999857891453 38.09999999999999431565811} V2 {228.6000000000000227373675 25.39999999999999857891453 38.09999999999999431565811} V3 {228.6000000000000227373675 25.39999999999999857891453 444.5000000000000568434189} V4 {228.6000000000000227373675 -25.39999999999999857891453 444.5000000000000568434189} V5 {-228.6000000000000227373675 -25.39999999999999857891453 38.09999999999999431565811} V6 {-228.6000000000000227373675 25.39999999999999857891453 38.09999999999999431565811} V7 {-228.6000000000000227373675 25.39999999999999857891453 444.5000000000000568434189} V8 {-228.6000000000000227373675 -25.39999999999999857891453 444.5000000000000568434189}
|
||||
put {body.white.s1} arb8 V1 {228.5999999999999658939487 -228.5999999999999658939487 -12.69999999999999928945726} V2 {228.5999999999999658939487 228.5999999999999658939487 -12.69999999999999928945726} V3 {228.5999999999999658939487 228.5999999999999658939487 63.49999999999999289457264} V4 {228.5999999999999658939487 -228.5999999999999658939487 63.49999999999999289457264} V5 {-228.5999999999999658939487 -228.5999999999999658939487 -12.69999999999999928945726} V6 {-228.5999999999999658939487 228.5999999999999658939487 -12.69999999999999928945726} V7 {-228.5999999999999658939487 228.5999999999999658939487 63.49999999999999289457264} V8 {-228.5999999999999658939487 -228.5999999999999658939487 63.49999999999999289457264}
|
||||
@@ -1,205 +0,0 @@
|
||||
title {ARB8 Unit Test Showcase}
|
||||
units mm
|
||||
attr set {_GLOBAL}
|
||||
|
||||
put {SpanningUnitCube} arb8 V1 {-1 -1 -1} V2 {1 -1 -1} V3 {1 1 -1} V4 {-1 1 -1} V5 {-1 -1 1} V6 {1 -1 1} V7 {1 1 1} V8 {-1 1 1}
|
||||
put {SpanningUnitCube.r} comb region yes tree {l SpanningUnitCube}
|
||||
attr set {SpanningUnitCube.r} {region} {R} {region_id} {8400} {material_id} {1} {los} {100} {rgb} {250/245/180} {oshader} {plastic}
|
||||
|
||||
put {UnitCube_Q1} arb8 V1 {0 0 0} V2 {1 0 0} V3 {1 1 0} V4 {0 1 0} V5 {0 0 1} V6 {1 0 1} V7 {1 1 1} V8 {0 1 1}
|
||||
put {UnitCube_Q1.r} comb region yes tree {l UnitCube_Q1}
|
||||
attr set {UnitCube_Q1.r} {region} {R} {region_id} {8401} {material_id} {1} {los} {100} {rgb} {255/106/106} {oshader} {plastic}
|
||||
|
||||
put {UnitCube_Q2} arb8 V1 {-1 0 0} V2 {0 0 0} V3 {0 1 0} V4 {-1 1 0} V5 {-1 0 1} V6 {0 0 1} V7 {0 1 1} V8 {-1 1 1}
|
||||
put {UnitCube_Q2.r} comb region yes tree {l UnitCube_Q2}
|
||||
attr set {UnitCube_Q2.r} {region} {R} {region_id} {8402} {material_id} {1} {los} {100} {rgb} {255/170/92} {oshader} {plastic}
|
||||
|
||||
put {UnitCube_Q3} arb8 V1 {-1 -1 0} V2 {0 -1 0} V3 {0 0 0} V4 {-1 0 0} V5 {-1 -1 1} V6 {0 -1 1} V7 {0 0 1} V8 {-1 0 1}
|
||||
put {UnitCube_Q3.r} comb region yes tree {l UnitCube_Q3}
|
||||
attr set {UnitCube_Q3.r} {region} {R} {region_id} {8403} {material_id} {1} {los} {100} {rgb} {255/224/102} {oshader} {plastic}
|
||||
|
||||
put {UnitCube_Q4} arb8 V1 {0 -1 0} V2 {1 -1 0} V3 {1 0 0} V4 {0 0 0} V5 {0 -1 1} V6 {1 -1 1} V7 {1 0 1} V8 {0 0 1}
|
||||
put {UnitCube_Q4.r} comb region yes tree {l UnitCube_Q4}
|
||||
attr set {UnitCube_Q4.r} {region} {R} {region_id} {8404} {material_id} {1} {los} {100} {rgb} {191/224/64} {oshader} {plastic}
|
||||
|
||||
put {UnitCube_Q5} arb8 V1 {0 0 -1} V2 {1 0 -1} V3 {1 1 -1} V4 {0 1 -1} V5 {0 0 0} V6 {1 0 0} V7 {1 1 0} V8 {0 1 0}
|
||||
put {UnitCube_Q5.r} comb region yes tree {l UnitCube_Q5}
|
||||
attr set {UnitCube_Q5.r} {region} {R} {region_id} {8405} {material_id} {1} {los} {100} {rgb} {105/206/107} {oshader} {plastic}
|
||||
|
||||
put {UnitCube_Q6} arb8 V1 {-1 0 -1} V2 {0 0 -1} V3 {0 1 -1} V4 {-1 1 -1} V5 {-1 0 0} V6 {0 0 0} V7 {0 1 0} V8 {-1 1 0}
|
||||
put {UnitCube_Q6.r} comb region yes tree {l UnitCube_Q6}
|
||||
attr set {UnitCube_Q6.r} {region} {R} {region_id} {8406} {material_id} {1} {los} {100} {rgb} {82/197/194} {oshader} {plastic}
|
||||
|
||||
put {UnitCube_Q7} arb8 V1 {-1 -1 -1} V2 {0 -1 -1} V3 {0 0 -1} V4 {-1 0 -1} V5 {-1 -1 0} V6 {0 -1 0} V7 {0 0 0} V8 {-1 0 0}
|
||||
put {UnitCube_Q7.r} comb region yes tree {l UnitCube_Q7}
|
||||
attr set {UnitCube_Q7.r} {region} {R} {region_id} {8407} {material_id} {1} {los} {100} {rgb} {92/146/255} {oshader} {plastic}
|
||||
|
||||
put {UnitCube_Q8} arb8 V1 {0 -1 -1} V2 {1 -1 -1} V3 {1 0 -1} V4 {0 0 -1} V5 {0 -1 0} V6 {1 -1 0} V7 {1 0 0} V8 {0 0 0}
|
||||
put {UnitCube_Q8.r} comb region yes tree {l UnitCube_Q8}
|
||||
attr set {UnitCube_Q8.r} {region} {R} {region_id} {8408} {material_id} {1} {los} {100} {rgb} {165/122/255} {oshader} {plastic}
|
||||
|
||||
put {Elongated_X1} arb8 V1 {-1 0 0} V2 {1 0 0} V3 {1 1 0} V4 {-1 1 0} V5 {-1 0 1} V6 {1 0 1} V7 {1 1 1} V8 {-1 1 1}
|
||||
put {Elongated_X1.r} comb region yes tree {l Elongated_X1}
|
||||
attr set {Elongated_X1.r} {region} {R} {region_id} {8409} {material_id} {1} {los} {100} {rgb} {255/120/120} {oshader} {plastic}
|
||||
|
||||
put {Elongated_X2} arb8 V1 {-1 -1 0} V2 {1 -1 0} V3 {1 0 0} V4 {-1 0 0} V5 {-1 -1 1} V6 {1 -1 1} V7 {1 0 1} V8 {-1 0 1}
|
||||
put {Elongated_X2.r} comb region yes tree {l Elongated_X2}
|
||||
attr set {Elongated_X2.r} {region} {R} {region_id} {8410} {material_id} {1} {los} {100} {rgb} {214/72/72} {oshader} {plastic}
|
||||
|
||||
put {Elongated_Y1} arb8 V1 {0 -1 0} V2 {1 -1 0} V3 {1 1 0} V4 {0 1 0} V5 {0 -1 1} V6 {1 -1 1} V7 {1 1 1} V8 {0 1 1}
|
||||
put {Elongated_Y1.r} comb region yes tree {l Elongated_Y1}
|
||||
attr set {Elongated_Y1.r} {region} {R} {region_id} {8411} {material_id} {1} {los} {100} {rgb} {255/191/94} {oshader} {plastic}
|
||||
|
||||
put {Elongated_Y2} arb8 V1 {-1 -1 0} V2 {0 -1 0} V3 {0 1 0} V4 {-1 1 0} V5 {-1 -1 1} V6 {0 -1 1} V7 {0 1 1} V8 {-1 1 1}
|
||||
put {Elongated_Y2.r} comb region yes tree {l Elongated_Y2}
|
||||
attr set {Elongated_Y2.r} {region} {R} {region_id} {8412} {material_id} {1} {los} {100} {rgb} {214/150/60} {oshader} {plastic}
|
||||
|
||||
put {Elongated_Z1} arb8 V1 {0 0 -1} V2 {1 0 -1} V3 {1 1 -1} V4 {0 1 -1} V5 {0 0 1} V6 {1 0 1} V7 {1 1 1} V8 {0 1 1}
|
||||
put {Elongated_Z1.r} comb region yes tree {l Elongated_Z1}
|
||||
attr set {Elongated_Z1.r} {region} {R} {region_id} {8413} {material_id} {1} {los} {100} {rgb} {114/210/255} {oshader} {plastic}
|
||||
|
||||
put {Elongated_Z2} arb8 V1 {-1 0 -1} V2 {0 0 -1} V3 {0 1 -1} V4 {-1 1 -1} V5 {-1 0 1} V6 {0 0 1} V7 {0 1 1} V8 {-1 1 1}
|
||||
put {Elongated_Z2.r} comb region yes tree {l Elongated_Z2}
|
||||
attr set {Elongated_Z2.r} {region} {R} {region_id} {8414} {material_id} {1} {los} {100} {rgb} {63/152/214} {oshader} {plastic}
|
||||
|
||||
put {ReverseUnitCube} arb8 V1 {0 0 0} V2 {0 1 0} V3 {1 1 0} V4 {1 0 0} V5 {0 0 1} V6 {0 1 1} V7 {1 1 1} V8 {1 0 1}
|
||||
put {ReverseUnitCube.r} comb region yes tree {l ReverseUnitCube}
|
||||
attr set {ReverseUnitCube.r} {region} {R} {region_id} {8415} {material_id} {1} {los} {100} {rgb} {230/230/230} {oshader} {plastic}
|
||||
|
||||
put {TopSlanted} arb8 V1 {0 0 0} V2 {1 0 0} V3 {1 1 0} V4 {0 1 0} V5 {0.2 0.2 1} V6 {1.2 0.2 1} V7 {1.2 1.2 1} V8 {0.2 1.2 1}
|
||||
put {TopSlanted.r} comb region yes tree {l TopSlanted}
|
||||
attr set {TopSlanted.r} {region} {R} {region_id} {8416} {material_id} {1} {los} {100} {rgb} {255/164/132} {oshader} {plastic}
|
||||
|
||||
put {UnevenSlanted} arb8 V1 {0 0 0} V2 {1 0 0} V3 {1 1 0} V4 {0 1 0} V5 {0.1 0.3 1} V6 {1.1 0.3 1} V7 {1.3 1.3 1} V8 {0.1 1.3 1}
|
||||
put {UnevenSlanted.r} comb region yes tree {l UnevenSlanted}
|
||||
attr set {UnevenSlanted.r} {region} {R} {region_id} {8417} {material_id} {1} {los} {100} {rgb} {255/132/178} {oshader} {plastic}
|
||||
|
||||
put {OppositeSlanted} arb8 V1 {0 0 0} V2 {1 0 0} V3 {1 1 0} V4 {0 1 0} V5 {-0.2 0.2 1} V6 {0.8 0.2 1} V7 {0.8 1.2 1} V8 {-0.2 1.2 1}
|
||||
put {OppositeSlanted.r} comb region yes tree {l OppositeSlanted}
|
||||
attr set {OppositeSlanted.r} {region} {R} {region_id} {8418} {material_id} {1} {los} {100} {rgb} {210/132/255} {oshader} {plastic}
|
||||
|
||||
put {PlanarARB6} arb8 V1 {0 0 0} V2 {1 0 0} V3 {1 1 0} V4 {0.5 0.5 0} V5 {0 0 1} V6 {1 0 1} V7 {1 1 1} V8 {0.5 0.5 1}
|
||||
put {PlanarARB6.r} comb region yes tree {l PlanarARB6}
|
||||
attr set {PlanarARB6.r} {region} {R} {region_id} {8419} {material_id} {1} {los} {100} {rgb} {165/152/255} {oshader} {plastic}
|
||||
|
||||
put {ConcavePlanar} arb8 V1 {0 0 0} V2 {1 0 0} V3 {1 1 0} V4 {0.6 0.4 0} V5 {0 0 1} V6 {1 0 1} V7 {1 1 1} V8 {0.6 0.4 1}
|
||||
put {ConcavePlanar.r} comb region yes tree {l ConcavePlanar}
|
||||
attr set {ConcavePlanar.r} {region} {R} {region_id} {8420} {material_id} {1} {los} {100} {rgb} {124/219/168} {oshader} {plastic}
|
||||
|
||||
put {MoreConcavePlanar} arb8 V1 {0 0 0} V2 {1 0 0} V3 {0.3 0.3 0} V4 {0 1 0} V5 {0 0 1} V6 {1 0 1} V7 {0.3 0.3 1} V8 {0 1 1}
|
||||
put {MoreConcavePlanar.r} comb region yes tree {l MoreConcavePlanar}
|
||||
attr set {MoreConcavePlanar.r} {region} {R} {region_id} {8421} {material_id} {1} {los} {100} {rgb} {61/184/132} {oshader} {plastic}
|
||||
|
||||
put {TwistedCubeNonPlanar} arb8 V1 {0 0 0} V2 {1 0 0} V3 {1 1 0} V4 {0 1 0} V5 {-0.183 0.317 1} V6 {0.683 -0.183 1} V7 {1.183 0.683 1} V8 {0.317 1.183 1}
|
||||
put {TwistedCubeNonPlanar.r} comb region yes tree {l TwistedCubeNonPlanar}
|
||||
attr set {TwistedCubeNonPlanar.r} {region} {R} {region_id} {8422} {material_id} {1} {los} {100} {rgb} {120/233/255} {oshader} {plastic}
|
||||
|
||||
put {LongConvexPlanar} arb8 V1 {4281 -119 1531} V2 {4281 78 1531} V3 {3322 78 1475} V4 {3322 -119 1475} V5 {4275 -119 1629} V6 {4275 78 1649} V7 {3315 78 1593} V8 {3315 -119 1573}
|
||||
put {LongConvexPlanar.r} comb region yes tree {l LongConvexPlanar}
|
||||
attr set {LongConvexPlanar.r} {region} {R} {region_id} {8423} {material_id} {1} {los} {100} {rgb} {255/216/128} {oshader} {plastic}
|
||||
|
||||
put {TaperedConvexPlanar} arb8 V1 {122.749 2.4 40.725} V2 {122.749 -7.4 40.725} V3 {122.611 -5 43.244} V4 {122.611 0 43.244} V5 {105.434 2.4 39.708} V6 {105.434 -7.4 39.708} V7 {105.295 -5 42.228} V8 {105.295 0 42.228}
|
||||
put {TaperedConvexPlanar.r} comb region yes tree {l TaperedConvexPlanar}
|
||||
attr set {TaperedConvexPlanar.r} {region} {R} {region_id} {8424} {material_id} {1} {los} {100} {rgb} {255/172/104} {oshader} {plastic}
|
||||
|
||||
put {BigConcavePlanar} arb8 V1 {500 -500 -500} V2 {500 500 -500} V3 {500 -169.922 -304.688} V4 {500 -500 500} V5 {400 -500 -500} V6 {400 500 -500} V7 {400 -169.922 -304.688} V8 {400 -500 500}
|
||||
put {BigConcavePlanar.r} comb region yes tree {l BigConcavePlanar}
|
||||
attr set {BigConcavePlanar.r} {region} {R} {region_id} {8425} {material_id} {1} {los} {100} {rgb} {255/115/87} {oshader} {plastic}
|
||||
|
||||
put {WarpedNonPlanar} arb8 V1 {0 0 0} V2 {1 0 0.1} V3 {1.1 1 0} V4 {0 1.1 -0.1} V5 {0.1 0 1} V6 {1 0.1 1.1} V7 {1.1 1.1 0.9} V8 {0 1 1}
|
||||
put {WarpedNonPlanar.r} comb region yes tree {l WarpedNonPlanar}
|
||||
attr set {WarpedNonPlanar.r} {region} {R} {region_id} {8426} {material_id} {1} {los} {100} {rgb} {255/99/156} {oshader} {plastic}
|
||||
|
||||
put {TwistedTopNonPlanar} arb8 V1 {0 0 0} V2 {1 0 -0.1} V3 {1.1 1.1 0} V4 {0 1.2 0.1} V5 {0.2 0 0.9} V6 {1 0.1 1.2} V7 {1.2 1.2 0.8} V8 {0 1 1}
|
||||
put {TwistedTopNonPlanar.r} comb region yes tree {l TwistedTopNonPlanar}
|
||||
attr set {TwistedTopNonPlanar.r} {region} {R} {region_id} {8427} {material_id} {1} {los} {100} {rgb} {216/118/255} {oshader} {plastic}
|
||||
|
||||
put {ComplexNonPlanar} arb8 V1 {0 0 0} V2 {0.8 0 0.1} V3 {1.1 0.9 0.2} V4 {0.1 1.1 -0.2} V5 {0.2 -0.2 0.8} V6 {1 0 1.1} V7 {1.1 0.9 0.9} V8 {0 1 0.9}
|
||||
put {ComplexNonPlanar.r} comb region yes tree {l ComplexNonPlanar}
|
||||
attr set {ComplexNonPlanar.r} {region} {R} {region_id} {8428} {material_id} {1} {los} {100} {rgb} {139/132/255} {oshader} {plastic}
|
||||
|
||||
put {ConcaveNonPlanar} arb8 V1 {0 0 0} V2 {1 0 0} V3 {1 1 0} V4 {0 1 0} V5 {0 0 1} V6 {0.4 0.4 1} V7 {1 1 1} V8 {0 1 1}
|
||||
put {ConcaveNonPlanar.r} comb region yes tree {l ConcaveNonPlanar}
|
||||
attr set {ConcaveNonPlanar.r} {region} {R} {region_id} {8429} {material_id} {1} {los} {100} {rgb} {110/207/255} {oshader} {plastic}
|
||||
|
||||
put {MoreConcaveNonPlanar} arb8 V1 {0 0 0} V2 {1 0 -0.05} V3 {1 1 0.03} V4 {0.7 0.3 0.32} V5 {0 0 1} V6 {1 0 1.1} V7 {1 1 0.92} V8 {0.7 0.3 0.7}
|
||||
put {MoreConcaveNonPlanar.r} comb region yes tree {l MoreConcaveNonPlanar}
|
||||
attr set {MoreConcaveNonPlanar.r} {region} {R} {region_id} {8430} {material_id} {1} {los} {100} {rgb} {89/188/197} {oshader} {plastic}
|
||||
|
||||
put {MostConcaveNonPlanar} arb8 V1 {0.2 0 0} V2 {1 0.3 0.1} V3 {1.1 1 -0.25} V4 {0.4 0.6 0} V5 {0 0.2 1} V6 {0.9 0 1.25} V7 {1 0.8 0.6} V8 {0.4 0.3 0.8}
|
||||
put {MostConcaveNonPlanar.r} comb region yes tree {l MostConcaveNonPlanar}
|
||||
attr set {MostConcaveNonPlanar.r} {region} {R} {region_id} {8431} {material_id} {1} {los} {100} {rgb} {71/226/179} {oshader} {plastic}
|
||||
|
||||
put {LargeSaddlePlanar} arb8 V1 {1000 -1000 -1000} V2 {1000 1000 -900} V3 {1000 1000 1100} V4 {1000 -1000 1000} V5 {-1000 -1000 -900} V6 {-1000 1000 -1000} V7 {-1000 1000 1000} V8 {-1000 -1000 1100}
|
||||
put {LargeSaddlePlanar.r} comb region yes tree {l LargeSaddlePlanar}
|
||||
attr set {LargeSaddlePlanar.r} {region} {R} {region_id} {8432} {material_id} {1} {los} {100} {rgb} {198/242/117} {oshader} {plastic}
|
||||
|
||||
put {groundplane} arb8 V1 {-1100 -800 -190} V2 {1100 -800 -190} V3 {1100 800 -190} V4 {-1100 800 -190} V5 {-1100 -800 -170} V6 {1100 -800 -170} V7 {1100 800 -170} V8 {-1100 800 -170}
|
||||
put {groundplane.r} comb region yes tree {l groundplane}
|
||||
attr set {groundplane.r} {region} {R} {region_id} {8433} {material_id} {1} {los} {100} {rgb} {240/240/240} {oshader} {stack {{checker {b {190 190 190} s 20}} {plastic {di .85 sp .15}}}}
|
||||
|
||||
put {lightpanel} arb8 V1 {-260 -160 1640} V2 {260 -160 1640} V3 {260 160 1640} V4 {-260 160 1640} V5 {-260 -160 1660} V6 {260 -160 1660} V7 {260 160 1660} V8 {-260 160 1660}
|
||||
put {light.r} comb region yes tree {l lightpanel}
|
||||
attr set {light.r} {region} {R} {region_id} {8434} {material_id} {1} {los} {100} {rgb} {255/255/245} {oshader} {light {s 32 v 0}} {shader} {light {s 32 v 0}}
|
||||
|
||||
put {SpanningUnitCube.place} comb region no tree {l SpanningUnitCube.r {49.4183462128 -6.50277282681 33.3997156149 -520 16.0569940398 56.3810489085 -12.7808554638 340 -30 19.4651295794 48.177886322 20 0 0 0 1}}
|
||||
put {UnitCube_Q1.place} comb region no tree {l UnitCube_Q1.r {95.3783673293 -58.1118549187 43.8859814008 -372.171276719 66.7846517861 98.6327164348 -14.5395163089 396.483654405 -29.030627472 35.9805442786 110.736728785 16.1566772042 0 0 0 1}}
|
||||
put {UnitCube_Q2.place} comb region no tree {l UnitCube_Q2.r {-95.3783673293 -58.1118549187 43.8859814008 -748.981217092 66.7846517861 -98.6327164348 14.5395163089 547.361506317 29.030627472 35.9805442786 110.736728785 16.1566772042 0 0 0 1}}
|
||||
put {UnitCube_Q3.place} comb region no tree {l UnitCube_Q3.r {-95.3783673293 72.8090108537 1.34721346343 -720.363255156 -66.7846517861 -88.341657059 46.2121403301 107.408195052 29.030627472 35.9805442786 110.736728785 52.1372214828 0 0 0 1}}
|
||||
put {UnitCube_Q4.place} comb region no tree {l UnitCube_Q4.r {95.3783673293 72.8090108537 1.34721346343 -343.553314783 -66.7846517861 88.341657059 -46.2121403301 308.746644227 -29.030627472 35.9805442786 110.736728785 52.1372214828 0 0 0 1}}
|
||||
put {UnitCube_Q5.place} comb region no tree {l UnitCube_Q5.r {39.8232820043 -110.312342921 -25.402622104 -418.792147629 109.413568075 30.603715996 38.6274991197 505.434410305 -29.030627472 -35.9805442786 110.736728785 52.8739502678 0 0 0 1}}
|
||||
put {UnitCube_Q6.place} comb region no tree {l UnitCube_Q6.r {-39.8232820043 -110.312342921 -25.402622104 -576.121413559 109.413568075 -30.603715996 -38.6274991197 606.824195257 29.030627472 -35.9805442786 110.736728785 52.8739502678 0 0 0 1}}
|
||||
put {UnitCube_Q7.place} comb region no tree {l UnitCube_Q7.r {-39.8232820043 104.175846754 44.2888153308 -544.343942924 -109.413568075 -47.4636006473 13.2618903102 52.063058013 29.030627472 -35.9805442786 110.736728785 16.8934059891 0 0 0 1}}
|
||||
put {UnitCube_Q8.place} comb region no tree {l UnitCube_Q8.r {39.8232820043 104.175846754 44.2888153308 -387.014676995 -109.413568075 47.4636006473 -13.2618903102 195.678336425 -29.030627472 -35.9805442786 110.736728785 16.8934059891 0 0 0 1}}
|
||||
|
||||
put {Elongated_X1.place} comb region no tree {l Elongated_X1.r {52.9768555715 8.7044814766 26.7896393402 702.252939592 0 57.0633909777 -18.5410196625 320.738814342 -28.1682937672 16.3707486802 50.3839837041 6.62263380786 0 0 0 1}}
|
||||
put {Elongated_X2.place} comb region no tree {l Elongated_X2.r {-53.927642778 8.12784805209 -25.0149441426 336.571396097 0 -57.0633909777 -18.5410196625 320.738814342 -26.3022688073 -16.664558085 51.2882360724 -53.9763970787 0 0 0 1}}
|
||||
put {Elongated_Y1.place} comb region no tree {l Elongated_Y1.r {24.8029823249 -45.5382654557 30.1840760513 592.506470812 53.190167245 27.696794106 -1.92190132524 487.570947797 -12.4747014491 27.5527489651 51.8191841717 -29.6722413613 0 0 0 1}}
|
||||
put {Elongated_Y2.place} comb region no tree {l Elongated_Y2.r {-24.8029823249 50.4884080186 -20.8742119261 418.035614801 -53.190167245 -17.0811791223 21.8869693709 129.256350935 12.4747014491 27.5527489651 51.8191841717 10.3277586387 0 0 0 1}}
|
||||
put {Elongated_Z1.place} comb region no tree {l Elongated_Z1.r {-28.1907786236 -48.449629644 21.3989109057 458.320204134 48.827860881 -14.3810251633 31.7651714468 495.981662898 -20.5212085995 32.3391326817 46.1850678792 29.0910379589 0 0 0 1}}
|
||||
put {Elongated_Z2.place} comb region no tree {l Elongated_Z2.r {28.5316954889 37.2470428028 37.3978629734 615.642326343 -49.4183462128 33.7844747485 4.0541735977 125.193508762 -18.5410196625 -32.7302164431 46.7435933735 -7.9054016097 0 0 0 1}}
|
||||
|
||||
put {ReverseUnitCube.place} comb region no tree {l ReverseUnitCube.r {103.433991196 -60.555851917 5.86500332073 -784.3715713 48.2320622081 88.6693278124 64.8954426786 -345.89841635 -37.082039325 -53.5792786803 100.767967408 14.9466752985 0 0 0 1}}
|
||||
put {TopSlanted.place} comb region no tree {l TopSlanted.r {96.3287340793 15.3039561576 -22.0581938655 -655.950517209 -20.4753045059 95.0207291039 -23.4909119866 -277.981798765 17.3648177667 27.1449805028 94.6657970834 -64.0387775034 0 0 0 1}}
|
||||
put {UnevenSlanted.place} comb region no tree {l UnevenSlanted.r {88.2050542109 -14.8789457562 22.785860616 -499.054900804 21.9919900071 84.4965683945 -29.9565078782 -299.239309022 -16.0290625539 34.053736387 84.2859552411 -35.8590156121 0 0 0 1}}
|
||||
put {OppositeSlanted.place} comb region no tree {l OppositeSlanted.r {82.3639103546 42.0405555876 -38.0628159361 -319.138489526 -47.5528258148 87.7679736664 -5.95915728267 -275.660075233 30.9016994375 23.0081395245 92.2806073208 -60.3058671501 0 0 0 1}}
|
||||
put {PlanarARB6.place} comb region no tree {l PlanarARB6.r {115.594480895 8.17480470115 31.1622937968 -837.465789697 20.3824258028 71.3324119214 -94.3199010171 -433.697468354 -24.9494028981 96.1501928109 67.3250898065 -79.2629398596 0 0 0 1}}
|
||||
put {ConcavePlanar.place} comb region no tree {l ConcavePlanar.r {107.244094838 -4.19493374266 53.6759411037 -678.362551099 -34.8457187174 85.7908832775 76.3262748569 -498.635719709 -41.0424171991 -83.7993250412 75.4532511765 6.69424553188 0 0 0 1}}
|
||||
put {MoreConcavePlanar.place} comb region no tree {l MoreConcavePlanar.r {98.2385703033 -68.8300310449 3.40736424785 -456.407951753 52.2343743832 70.4997088106 -81.8618420903 -455.436120552 44.9527912099 68.4997655761 87.6757017563 -114.564129271 0 0 0 1}}
|
||||
put {TwistedCubeNonPlanar.place} comb region no tree {l TwistedCubeNonPlanar.r {58.6764988003 -36.5971430924 54.1750992397 -318.127227474 52.8325568251 69.4213241451 -10.3259123031 -490.963984334 -38.5099104061 39.4785086222 68.3787827407 -18.6736904784 0 0 0 1}}
|
||||
|
||||
put {WarpedNonPlanar.place} comb region no tree {l WarpedNonPlanar.r {85.9669900169 48.3491658661 16.4934771193 257.879375705 -34.7329185229 78.9947205011 -50.5317573791 -244.078112398 -37.4606593416 37.7119648521 84.7024598739 -20.4894479677 0 0 0 1}}
|
||||
put {TwistedTopNonPlanar.place} comb region no tree {l TwistedTopNonPlanar.r {83.4930920481 -37.5301552898 11.8785977012 485.889009209 27.1285501058 75.0409121486 46.407039684 -331.825549179 -28.5246456346 -38.4845294501 78.9049785729 30.8077668357 0 0 0 1}}
|
||||
put {ComplexNonPlanar.place} comb region no tree {l ComplexNonPlanar.r {68.2221969569 -62.1661301805 -1.34690754179 691.058658649 49.5663274432 55.5767314233 -54.5446254664 -272.725927774 37.5449208993 39.589256647 74.4565627193 -51.9703252094 0 0 0 1}}
|
||||
put {ConcaveNonPlanar.place} comb region no tree {l ConcaveNonPlanar.r {99.563920506 36.7265877365 56.0194920247 243.844999866 -52.9390755862 104.63063394 25.4928365894 -473.592197472 -41.0424171991 -45.8648906522 103.014231036 -8.05346159232 0 0 0 1}}
|
||||
put {MoreConcaveNonPlanar.place} comb region no tree {l MoreConcaveNonPlanar.r {91.7377293852 -5.0835848262 49.4652906758 450.703650116 19.4994563335 99.1649372544 -25.9722011215 -480.696791205 -45.7430761867 32.0771132385 88.131144304 -21.4358692855 0 0 0 1}}
|
||||
put {MostConcaveNonPlanar.place} comb region no tree {l MostConcaveNonPlanar.r {58.9095344445 52.9796505277 11.0825710686 635.568645257 -49.4309686252 45.9860647701 42.9169102771 -452.26445478 22.0509884654 -38.4504678375 66.5981638694 5.79810832812 0 0 0 1}}
|
||||
|
||||
put {LongConvexPlanar.place} comb region no tree {l LongConvexPlanar.r {0.115561944047 0.0319553637337 0.0324930028006 -639.003248908 -0.0245634494865 0.1182771118 -0.0289597166373 280.951739329 -0.0383872042702 0.0205154324115 0.116348798857 4.47834436767 0 0 0 1}}
|
||||
put {TaperedConvexPlanar.place} comb region no tree {l TaperedConvexPlanar.r {5.7378157661 -3.26643327706 1.91741052485 -591.929831404 2.55464017008 5.90709171549 2.41840036102 -236.823025558 -2.7964018087 -1.30585617557 6.14357028226 90.775965566 0 0 0 1}}
|
||||
put {BigConcavePlanar.place} comb region no tree {l BigConcavePlanar.r {0.0998972458041 0.0482115762187 -0.0457841042204 -194.953760612 -0.0576757017563 0.103947290059 -0.0163851858765 -114.04593421 0.033076482698 0.0356455440104 0.109705703974 -4.88441721412 0 0 0 1}}
|
||||
put {LargeSaddlePlanar.place} comb region no tree {l LargeSaddlePlanar.r {0.0470204253358 -0.0323394992732 0.0029227573361 149.853862133 0.0293816227061 0.0445634112955 0.0203992338904 -141.019961695 -0.01382410832 -0.0152828427629 0.0532976065944 41.3351196703 0 0 0 1}}
|
||||
|
||||
put {arb8_quadrants.c} comb region no tree {u {u {u {u {u {u {u {u {l SpanningUnitCube.place} {l UnitCube_Q1.place}} {l UnitCube_Q2.place}} {l UnitCube_Q3.place}} {l UnitCube_Q4.place}} {l UnitCube_Q5.place}} {l UnitCube_Q6.place}} {l UnitCube_Q7.place}} {l UnitCube_Q8.place}}
|
||||
attr set {arb8_quadrants.c} {inherit} {1}
|
||||
|
||||
put {arb8_axes.c} comb region no tree {u {u {u {u {u {l Elongated_X1.place} {l Elongated_X2.place}} {l Elongated_Y1.place}} {l Elongated_Y2.place}} {l Elongated_Z1.place}} {l Elongated_Z2.place}}
|
||||
attr set {arb8_axes.c} {inherit} {1}
|
||||
|
||||
put {arb8_planar.c} comb region no tree {u {u {u {u {u {u {u {l ReverseUnitCube.place} {l TopSlanted.place}} {l UnevenSlanted.place}} {l OppositeSlanted.place}} {l PlanarARB6.place}} {l ConcavePlanar.place}} {l MoreConcavePlanar.place}} {l TwistedCubeNonPlanar.place}}
|
||||
attr set {arb8_planar.c} {inherit} {1}
|
||||
|
||||
put {arb8_nonplanar.c} comb region no tree {u {u {u {u {u {l WarpedNonPlanar.place} {l TwistedTopNonPlanar.place}} {l ComplexNonPlanar.place}} {l ConcaveNonPlanar.place}} {l MoreConcaveNonPlanar.place}} {l MostConcaveNonPlanar.place}}
|
||||
attr set {arb8_nonplanar.c} {inherit} {1}
|
||||
|
||||
put {arb8_large_planars.c} comb region no tree {u {u {u {l LongConvexPlanar.place} {l TaperedConvexPlanar.place}} {l BigConcavePlanar.place}} {l LargeSaddlePlanar.place}}
|
||||
attr set {arb8_large_planars.c} {inherit} {1}
|
||||
|
||||
put {arb8_small_gallery.c} comb region no tree {u {u {u {l arb8_quadrants.c} {l arb8_axes.c}} {l arb8_planar.c}} {l arb8_nonplanar.c}}
|
||||
attr set {arb8_small_gallery.c} {inherit} {1}
|
||||
|
||||
put {arb8_large_gallery.c} comb region no tree {l arb8_large_planars.c}
|
||||
attr set {arb8_large_gallery.c} {inherit} {1}
|
||||
|
||||
put {arb8_showcase} comb region no tree {u {u {u {l arb8_small_gallery.c} {l arb8_large_gallery.c}} {l groundplane.r}} {l light.r}}
|
||||
attr set {arb8_showcase} {inherit} {1}
|
||||
@@ -1,43 +0,0 @@
|
||||
title {Single Row 7-ball Deep Groove 608Z Ball Bearing, 8mm ID x 22mm OD x 7mm}
|
||||
units mm
|
||||
put {ballgroove.s} tor V {0 0 0} H {0 1 0} r_a 7.5 r_h 2
|
||||
put {innerringrightround.s} tor V {0 3.399999999999999911182158 0} H {0 1 0} r_a 4.099999999999999644728632 r_h 0.1000000000000000055511151
|
||||
put {outerringmainin.s} tgc V {0 -3.5 0} H {0 7 0} A {0 0 9.599999999999999644728632} B {9.599999999999999644728632 0 0} C {0 0 9.599999999999999644728632} D {9.599999999999999644728632 0 0}
|
||||
put {outerringmaincenter.s} tgc V {0 -3.399999999999999911182158 0} H {0 6.799999999999999822364316 0} A {0 0 11} B {11 0 0} C {0 0 11} D {11 0 0}
|
||||
put {innerring2.s} tgc V {0 -3.399999999999999911182158 0} H {0 6.799999999999999822364316 0} A {0 0 5.400000000000000355271368} B {5.400000000000000355271368 0 0} C {0 0 5.400000000000000355271368} D {5.400000000000000355271368 0 0}
|
||||
put {innerring2leftround.s} tor V {0 -3.399999999999999911182158 0} H {0 1 0} r_a 5.299999999999999822364316 r_h 0.1000000000000000055511151
|
||||
put {outerringmaininrightround.s} tor V {0 3.399999999999999911182158 0} H {0 0.9999999999999998889776975 0} r_a 9.599999999999999644728632 r_h 0.1000000000000000055511151
|
||||
put {outerringinner2.s} tgc V {0 -2.200000000000000177635684 0} H {0 4.400000000000000355271368 0} A {0 0 9.5} B {9.5 0 0} C {0 0 9.5} D {9.5 0 0}
|
||||
put {outerringmainleftround.s} tor V {0 -3.399999999999999911182158 0} H {0 0.9999999999999998889776975 0} r_a 10.90000000000000035527137 r_h 0.1000000000000000055511151
|
||||
put {outerring.r} comb region yes tree {u {u {u {u {u {u {u {u {u {- {- {l outerringmaincenter.s} {l outerringmainfullcut.s}} {l ballgroove.s}} {- {- {l outerringmainout.s} {l outerringmainin.s}} {l ballgroove.s}}} {- {- {l outerringinner.s} {l outerringinnercut.s}} {l ballgroove.s}}} {- {- {l outerringinner2.s} {l outerringinnercut2.s}} {l ballgroove.s}}} {l outerringmainleftround.s}} {l outerringmainrightround.s}} {l outerringmaininleftround.s}} {l outerringmaininrightround.s}} {l outerringinnerrightround.s}} {l outerringinnerleftround.s}}
|
||||
attr set {outerring.r} {region} {R} {region_id} {1010} {material_id} {1} {los} {100}
|
||||
put {innerring.s} tgc V {0 -3.5 0} H {0 7 0} A {0 0 5.299999999999999822364316} B {5.299999999999999822364316 0 0} C {0 0 5.299999999999999822364316} D {5.299999999999999822364316 0 0}
|
||||
put {innerring.r} comb region yes tree {u {u {u {u {u {u {u {u {- {- {l innneroutercenter.s} {l ballgroove.s}} {l shaftcut1.s}} {- {- {l innerring.s} {l ballgroove.s}} {l shaftcut2.s}}} {- {- {l innerring2.s} {l ballgroove.s}} {l shaftcut1.s}}} {- {l innerlefttrc.s} {l shaftcut1.s}}} {- {l innerrighttrc.s} {l shaftcut1.s}}} {l innerring2leftround.s}} {l innerring2rightround.s}} {l innerringleftround.s}} {l innerringrightround.s}}
|
||||
attr set {innerring.r} {region} {R} {region_id} {1004} {material_id} {1} {los} {100}
|
||||
put {shaftcut2.s} tgc V {0 -3.5 0} H {0 7 0} A {0 0 4.099999999999999644728632} B {4.099999999999999644728632 0 0} C {0 0 4.099999999999999644728632} D {4.099999999999999644728632 0 0}
|
||||
put {shaftcut1.s} tgc V {0 -3.5 0} H {0 7 0} A {0 0 4} B {4 0 0} C {0 0 4} D {4 0 0}
|
||||
put {outerringinner.s} tgc V {0 -2.299999999999999822364316 0} H {0 4.599999999999999644728632 0} A {0 0 9.5} B {9.5 0 0} C {0 0 9.5} D {9.5 0 0}
|
||||
put {innerringleftround.s} tor V {0 -3.399999999999999911182158 0} H {0 1 0} r_a 4.099999999999999644728632 r_h 0.1000000000000000055511151
|
||||
put {outerringinnercut2.s} tgc V {0 -2.299999999999999822364316 0} H {0 4.599999999999999644728632 0} A {0 0 9} B {9 0 0} C {0 0 9} D {9 0 0}
|
||||
put {outerringinnerrightround.s} tor V {0 2.200000000000000177635684 0} H {0 0.9999999999999998889776975 0} r_a 9.099999999999999644728632 r_h 0.1000000000000000055511151
|
||||
put {innerrighttrc.s} tgc V {0 2.5 0} H {0 0.2000000000000000111022302 0} A {0 0 6.200000000000000177635684} B {6.200000000000000177635684 0 0} C {0 0 5.400000000000000355271368} D {5.400000000000000355271368 0 0}
|
||||
put {outerringmaininleftround.s} tor V {0 -3.399999999999999911182158 0} H {0 0.9999999999999998889776975 0} r_a 9.599999999999999644728632 r_h 0.1000000000000000055511151
|
||||
put {outerringinnercut.s} tgc V {0 -2.299999999999999822364316 0} H {0 4.599999999999999644728632 0} A {0 0 9.099999999999999644728632} B {9.099999999999999644728632 0 0} C {0 0 9.099999999999999644728632} D {9.099999999999999644728632 0 0}
|
||||
put {innneroutercenter.s} tgc V {0 -2.5 0} H {0 5 0} A {0 0 6.200000000000000177635684} B {6.200000000000000177635684 0 0} C {0 0 6.200000000000000177635684} D {6.200000000000000177635684 0 0}
|
||||
put {bearing} comb region no tree {u {u {l outerring.r} {l innerring.r}} {l balls.r}}
|
||||
attr set {bearing} {shader} {glass}
|
||||
put {balls.r} comb region yes tree {u {u {u {l ball101} {l ball201}} {u {l ball301} {l ball401}}} {u {u {l ball501} {l ball601}} {l ball701}}}
|
||||
attr set {balls.r} {region} {R} {region_id} {1011} {material_id} {1} {los} {100}
|
||||
put {innerlefttrc.s} tgc V {0 -2.5 0} H {0 -0.2000000000000000111022302 0} A {0 0 -6.200000000000000177635684} B {6.200000000000000177635684 0 0} C {0 0 -5.400000000000000355271368} D {5.400000000000000355271368 0 0}
|
||||
put {ball701} ell V {1.836909530733565887317127E-15 0 -7.5} A {2 0 4.898425415289509032845672E-16} B {0 2 0} C {-4.898425415289509032845672E-16 0 2}
|
||||
put {ball601} ell V {5.57358619108045960643949 0 -5.018479547691433673151096} A {1.338261212717715586961731 0 1.486289650954789154368996} B {0 2 0} C {-1.486289650954789154368996 0 1.338261212717715586961731}
|
||||
put {ball501} ell V {7.386058147591560540945466 0 1.302361332501977386755243} A {-0.3472963553338606623732687 0 1.969615506024416040631309} B {0 2 0} C {-1.969615506024416040631309 0 -0.3472963553338606623732687}
|
||||
put {ball401} ell V {3.521036720894181293317615 0 6.622106946441951969006823} A {-1.765895185717853754781004 0 0.9389431255717817226269517} B {0 2 0} C {-0.9389431255717817226269517 0 -1.765895185717853754781004}
|
||||
put {ball301} ell V {-3.050524823068503366130244 0 6.851590932319505888870026} A {-1.827090915285201511153446 0 -0.8134732861516008606272976} B {0 2 0} C {0.8134732861516008606272976 0 -1.827090915285201511153446}
|
||||
put {ball201} ell V {-7.277217947069973824625322 0 1.814414216997508377815507} A {-0.4838437911993355711182119 0 -1.940591452551992945885218} B {0 2 0} C {1.940591452551992945885218 0 -0.4838437911993355711182119}
|
||||
put {ball101} ell V {-5.910080652050415217502177 0 -4.617461064942436799185543} A {1.231322950651316583403627 0 -1.576021507213444028394633} B {0 2 0} C {1.576021507213444028394633 0 1.231322950651316583403627}
|
||||
put {outerringmainfullcut.s} tgc V {0 -3.5 0} H {0 7 0} A {0 0 9.5} B {9.5 0 0} C {0 0 9.5} D {9.5 0 0}
|
||||
put {outerringmainout.s} tgc V {0 -3.5 0} H {0 7 0} A {0 0 10.90000000000000035527137} B {10.90000000000000035527137 0 0} C {0 0 10.90000000000000035527137} D {10.90000000000000035527137 0 0}
|
||||
put {innerring2rightround.s} tor V {0 3.399999999999999911182158 0} H {0 1 0} r_a 5.299999999999999822364316 r_h 0.1000000000000000055511151
|
||||
put {outerringinnerleftround.s} tor V {0 -2.200000000000000177635684 0} H {0 0.9999999999999998889776975 0} r_a 9.099999999999999644728632 r_h 0.1000000000000000055511151
|
||||
put {outerringmainrightround.s} tor V {0 3.399999999999999911182158 0} H {0 0.9999999999999998889776975 0} r_a 10.90000000000000035527137 r_h 0.1000000000000000055511151
|
||||
@@ -1,350 +0,0 @@
|
||||
title {Small bicycle wheel by lbutler}
|
||||
units in
|
||||
put {rcastooth.s28_1_1_29} comb region no tree {l rcastooth.s {1 0 0 53.4214 0 1 0 -37.1824 0 0 1 0 0 0 0 1}}
|
||||
put {rcastooth.s18_1_1_19} comb region no tree {l rcastooth.s {1 0 0 34.6765 0 1 0 -25.1939 0 0 1 0 0 0 0 1}}
|
||||
put {rcastooth.s27_1_1_28} comb region no tree {l rcastooth.s {1 0 0 44.8431 0 1 0 -47.175 0 0 1 0 0 0 0 1}}
|
||||
put {rcastooth.s17_1_1_18} comb region no tree {l rcastooth.s {1 0 0 25.1939 0 1 0 -34.6765 0 0 1 0 0 0 0 1}}
|
||||
put {rcastooth.s26_1_1_27} comb region no tree {l rcastooth.s {1 0 0 55.6095 0 1 0 -13.1797 0 0 1 0 0 0 0 1}}
|
||||
put {rcastooth.s16_1_1_17} comb region no tree {l rcastooth.s {1 0 0 34.0469 0 1 0 -13.1898 0 0 1 0 0 0 0 1}}
|
||||
put {rcastooth.s25_1_1_26} comb region no tree {l rcastooth.s {1 0 0 51.0711 0 1 0 -25.6489 0 0 1 0 0 0 0 1}}
|
||||
put {rcastooth.s15_1_1_16} comb region no tree {l rcastooth.s {1 0 0 26.9831 0 1 0 -24.5983 0 0 1 0 0 0 0 1}}
|
||||
put {rcastooth.s24_1_1_25} comb region no tree {l rcastooth.s {1 0 0 43.7794 0 1 0 -36.7353 0 0 1 0 0 0 0 1}}
|
||||
put {rcastooth.s29_1_1_30} comb region no tree {l rcastooth.s {1 0 0 59.8127 0 1 0 -25.6676 0 0 1 0 0 0 0 1}}
|
||||
put {rhspkh2_1_1_18} comb region no tree {l rhspkh2 {1 0 0 1.18e-05 0 1 0 -7.67456 0 0 1 0 0 0 0 1}}
|
||||
put {rcastooth.s14_1_1_15} comb region no tree {l rcastooth.s {1 0 0 29.8752 0 1 0 -13.3013 0 0 1 0 0 0 0 1}}
|
||||
put {rcastooth.s23_1_1_24} comb region no tree {l rcastooth.s {1 0 0 34.1276 0 1 0 -45.8413 0 0 1 0 0 0 0 1}}
|
||||
put {rhspkh2_1_1_17} comb region no tree {l rhspkh2 {1 0 0 -2.62489 0 1 0 -14.8863 0 0 1 0 0 0 0 1}}
|
||||
put {rcastooth.s19_1_1_20} comb region no tree {l rcastooth.s {1 0 0 40.7647 0 1 0 -13.2452 0 0 1 0 0 0 0 1}}
|
||||
put {rhspkh2_1_1_16} comb region no tree {l rhspkh2 {1 0 0 -7.55799 0 1 0 -20.7653 0 0 1 0 0 0 0 1}}
|
||||
put {rhspkh2_1_1_15} comb region no tree {l rhspkh2 {1 0 0 -14.2043 0 1 0 -24.6026 0 0 1 0 0 0 0 1}}
|
||||
put {rcastooth.s13_1_1_14} comb region no tree {l rcastooth.s {1 0 0 21.8822 0 1 0 -24.3027 0 0 1 0 0 0 0 1}}
|
||||
put {rcastooth.s22_1_1_23} comb region no tree {l rcastooth.s {1 0 0 47.3876 0 1 0 -13.2774 0 0 1 0 0 0 0 1}}
|
||||
put {rhspkh2_1_1_14} comb region no tree {l rhspkh2 {1 0 0 -21.7623 0 1 0 -25.9353 0 0 1 0 0 0 0 1}}
|
||||
put {rhspkh2_1_1_13} comb region no tree {l rhspkh2 {1 0 0 -29.3202 0 1 0 -24.6026 0 0 1 0 0 0 0 1}}
|
||||
put {rcastooth.s12_1_1_13} comb region no tree {l rcastooth.s {1 0 0 25.5268 0 1 0 -13.3975 0 0 1 0 0 0 0 1}}
|
||||
put {rcastooth.s21_1_1_22} comb region no tree {l rcastooth.s {1 0 0 42.0481 0 1 0 -25.57 0 0 1 0 0 0 0 1}}
|
||||
put {rcastooth.s30_1_1_31} comb region no tree {l rcastooth.s {1 0 0 63.7552 0 1 0 -13.102 0 0 1 0 0 0 0 1}}
|
||||
put {rhspkh2_1_1_12} comb region no tree {l rhspkh2 {1 0 0 -35.9666 0 1 0 -20.7654 0 0 1 0 0 0 0 1}}
|
||||
put {rhspkh2_1_1_11} comb region no tree {l rhspkh2 {1 0 0 -40.8997 0 1 0 -14.8863 0 0 1 0 0 0 0 1}}
|
||||
put {rcastooth.s11_1_1_12} comb region no tree {l rcastooth.s {1 0 0 16.3767 0 1 0 -23.7258 0 0 1 0 0 0 0 1}}
|
||||
put {rcastooth.s20_1_1_21} comb region no tree {l rcastooth.s {1 0 0 33.5901 0 1 0 -35.9663 0 0 1 0 0 0 0 1}}
|
||||
put {rhspkh2_1_1_10} comb region no tree {l rhspkh2 {1 0 0 -43.5246 0 1 0 -7.67456 0 0 1 0 0 0 0 1}}
|
||||
put {rcastooth.s10_1_1_11} comb region no tree {l rcastooth.s {1 0 0 20.8336 0 1 0 -13.389 0 0 1 0 0 0 0 1}}
|
||||
put {rhspkh2_1_1_9} comb region no tree {l rhspkh2 {1 0 0 -43.5246 0 1 0 4e-07 0 0 1 0 0 0 0 1}}
|
||||
put {rhspkh2_1_1_8} comb region no tree {l rhspkh2 {1 0 0 -40.8997 0 1 0 7.21172 0 0 1 0 0 0 0 1}}
|
||||
put {rhspkh2_1_1_7} comb region no tree {l rhspkh2 {1 0 0 -35.9666 0 1 0 13.0907 0 0 1 0 0 0 0 1}}
|
||||
put {rhspkh2_1_1_6} comb region no tree {l rhspkh2 {1 0 0 -29.3202 0 1 0 16.928 0 0 1 0 0 0 0 1}}
|
||||
put {rhspkh2_1_1_5} comb region no tree {l rhspkh2 {1 0 0 -21.7623 0 1 0 18.2607 0 0 1 0 0 0 0 1}}
|
||||
put {rhspkh2_1_1_4} comb region no tree {l rhspkh2 {1 0 0 -14.2043 0 1 0 16.928 0 0 1 0 0 0 0 1}}
|
||||
put {rhspkh2_1_1_3} comb region no tree {l rhspkh2 {1 0 0 -7.55799 0 1 0 13.0908 0 0 1 0 0 0 0 1}}
|
||||
put {rhspkh2_1_1_2} comb region no tree {l rhspkh2 {1 0 0 -2.62489 0 1 0 7.21172 0 0 1 0 0 0 0 1}}
|
||||
put {rhspkh2_1_1_1} comb region no tree {l rhspkh2 {1 0 0 1.18e-05 0 1 0 4e-07 0 0 1 0 0 0 0 1}}
|
||||
put {rhspkh_1_1_18} comb region no tree {l rhspkh {1 0 0 -1.3327 0 1 0 -7.55796 0 0 1 0 0 0 0 1}}
|
||||
put {rhspkh_1_1_17} comb region no tree {l rhspkh {1 0 0 -5.1699 0 1 0 -14.2043 0 0 1 0 0 0 0 1}}
|
||||
put {rhspkh_1_1_16} comb region no tree {l rhspkh {1 0 0 -11.049 0 1 0 -19.1374 0 0 1 0 0 0 0 1}}
|
||||
put {rhspkh_1_1_15} comb region no tree {l rhspkh {1 0 0 -18.2607 0 1 0 -21.7623 0 0 1 0 0 0 0 1}}
|
||||
put {rhspkh_1_1_14} comb region no tree {l rhspkh {1 0 0 -25.9353 0 1 0 -21.7623 0 0 1 0 0 0 0 1}}
|
||||
put {rhspkh_1_1_13} comb region no tree {l rhspkh {1 0 0 -33.147 0 1 0 -19.1374 0 0 1 0 0 0 0 1}}
|
||||
put {rhspkh_1_1_12} comb region no tree {l rhspkh {1 0 0 -39.0261 0 1 0 -14.2043 0 0 1 0 0 0 0 1}}
|
||||
put {rhspkh_1_1_11} comb region no tree {l rhspkh {1 0 0 -42.8633 0 1 0 -7.55796 0 0 1 0 0 0 0 1}}
|
||||
put {rhspkh_1_1_10} comb region no tree {l rhspkh {1 0 0 -44.196 0 1 0 -4.57038e-12 0 0 1 0 0 0 0 1}}
|
||||
put {rcastooth.s9_1_1_10} comb region no tree {l rcastooth.s {1 0 0 18.4941 0 1 0 -13.4368 0 0 1 0 0 0 0 1}}
|
||||
put {rcastooth.s} tgc V {0 0 -0.3755760995733843365940174} H {0 0 2.57364612783325474865137} A {0 -4.762499999999999289457264 0} B {4.762499999999999289457264 0 0} C {0 -4.762499999999999289457264 0} D {4.762499999999999289457264 0 0}
|
||||
put {rcassette.r} comb region yes tree {u {u {u {u {l rcas11t.c1} {l rcas12t.c1}} {u {l rcas14t.c1} {l rcas16t.c1}}} {u {u {l rcas18t.c1} {l rcas21t.c1}} {u {l rcas24t.c1} {l rcas28t.c1}}}} {u {l rcas32t.c1} {l rcas.s2}}}
|
||||
attr set {rcassette.r} {region} {R} {region_id} {1002} {material_id} {1} {los} {100}
|
||||
put {rhspkh_1_1_9} comb region no tree {l rhspkh {1 0 0 -42.8633 0 1 0 7.55796 0 0 1 0 0 0 0 1}}
|
||||
put {rhspkh_1_1_8} comb region no tree {l rhspkh {1 0 0 -39.0261 0 1 0 14.2043 0 0 1 0 0 0 0 1}}
|
||||
put {rhspkh_1_1_7} comb region no tree {l rhspkh {1 0 0 -33.147 0 1 0 19.1374 0 0 1 0 0 0 0 1}}
|
||||
put {rhspkh_1_1_6} comb region no tree {l rhspkh {1 0 0 -25.9353 0 1 0 21.7623 0 0 1 0 0 0 0 1}}
|
||||
put {rhspkh_1_1_5} comb region no tree {l rhspkh {1 0 0 -18.2607 0 1 0 21.7623 0 0 1 0 0 0 0 1}}
|
||||
put {rhspkh_1_1_4} comb region no tree {l rhspkh {1 0 0 -11.049 0 1 0 19.1374 0 0 1 0 0 0 0 1}}
|
||||
put {rhspkh_1_1_3} comb region no tree {l rhspkh {1 0 0 -5.1699 0 1 0 14.2043 0 0 1 0 0 0 0 1}}
|
||||
put {rhspkh_1_1_2} comb region no tree {l rhspkh {1 0 0 -1.3327 0 1 0 7.55796 0 0 1 0 0 0 0 1}}
|
||||
put {rhspkh_1_1_1} comb region no tree {l rhspkh}
|
||||
put {rcastooth.s8_1_1_9} comb region no tree {l rcastooth.s {1 0 0 7.06413 0 1 0 -21.7412 0 0 1 0 0 0 0 1}}
|
||||
put {rcastooth.s7_1_1_8} comb region no tree {l rcastooth.s {1 0 0 -7.06413 0 1 0 -21.7412 0 0 1 0 0 0 0 1}}
|
||||
put {rcastooth.s6_1_1_7} comb region no tree {l rcastooth.s {1 0 0 -18.4941 0 1 0 -13.4368 0 0 1 0 0 0 0 1}}
|
||||
put {rcastooth.s5_1_1_6} comb region no tree {l rcastooth.s {1 0 0 -22.86 0 1 0 -4.72798e-12 0 0 1 0 0 0 0 1}}
|
||||
put {rcastooth.s4_1_1_5} comb region no tree {l rcastooth.s {1 0 0 -18.4941 0 1 0 13.4368 0 0 1 0 0 0 0 1}}
|
||||
put {rcastooth.s3_1_1_4} comb region no tree {l rcastooth.s {1 0 0 -7.06413 0 1 0 21.7412 0 0 1 0 0 0 0 1}}
|
||||
put {rcastooth.s2_1_1_3} comb region no tree {l rcastooth.s {1 0 0 7.06413 0 1 0 21.7412 0 0 1 0 0 0 0 1}}
|
||||
put {rcastooth.s1_1_1_2} comb region no tree {l rcastooth.s {1 0 0 18.4941 0 1 0 13.4368 0 0 1 0 0 0 0 1}}
|
||||
put {rcas28t.s1-1} comb region no tree {u {u {u {u {u {l rcastooth.s_1_1_8} {l rcastooth.s1_1__7}} {u {l rcastooth.s2_1__7} {l rcastooth.s3_1__7}}} {u {u {l rcastooth.s4_1__7} {l rcastooth.s5_1__7}} {u {l rcastooth.s6_1__7} {l rcastooth.s7_1__7}}}} {u {u {u {l rcastooth.s8_1__7} {l rcastooth.s9_1__7}} {u {l rcastooth.s10_1_6} {l rcastooth.s11_1_5}}} {u {u {l rcastooth.s12_1_5} {l rcastooth.s13_1_4}} {u {l rcastooth.s14_1_4} {l rcastooth.s15_1_3}}}}} {u {u {u {u {l rcastooth.s16_1_3} {l rcastooth.s17_1_2}} {u {l rcastooth.s18_1_2} {l rcastooth.s19_1_2}}} {u {u {l rcastooth.s20_1_1} {l rcastooth.s21_1_1}} {u {l rcastooth.s22_1_1} {l rcastooth.s23_1_1_24}}}} {u {u {l rcastooth.s24_1_1_25} {l rcastooth.s25_1_1_26}} {l rcastooth.s26_1_1_27}}}}
|
||||
put {rcas18t.s1-1} comb region no tree {u {u {u {u {u {l rcastooth.s_1_1_5} {l rcastooth.s1_1__4}} {u {l rcastooth.s2_1__4} {l rcastooth.s3_1__4}}} {u {u {l rcastooth.s4_1__4} {l rcastooth.s5_1__4}} {u {l rcastooth.s6_1__4} {l rcastooth.s7_1__4}}}} {u {u {u {l rcastooth.s8_1__4} {l rcastooth.s9_1__4}} {u {l rcastooth.s10_1_3} {l rcastooth.s11_1_2}}} {u {u {l rcastooth.s12_1_2} {l rcastooth.s13_1_1}} {u {l rcastooth.s14_1_1} {l rcastooth.s15_1_1_16}}}}} {l rcastooth.s16_1_1_17}}
|
||||
put {rcas16t.s1-1} comb region no tree {u {u {u {u {l rcastooth.s_1_1_4} {l rcastooth.s1_1__3}} {u {l rcastooth.s2_1__3} {l rcastooth.s3_1__3}}} {u {u {l rcastooth.s4_1__3} {l rcastooth.s5_1__3}} {u {l rcastooth.s6_1__3} {l rcastooth.s7_1__3}}}} {u {u {u {l rcastooth.s8_1__3} {l rcastooth.s9_1__3}} {u {l rcastooth.s10_1_2} {l rcastooth.s11_1_1}}} {u {u {l rcastooth.s12_1_1} {l rcastooth.s13_1_1_14}} {l rcastooth.s14_1_1_15}}}}
|
||||
put {rcas24t.s1-1} comb region no tree {u {u {u {u {u {l rcastooth.s_1_1_7} {l rcastooth.s1_1__6}} {u {l rcastooth.s2_1__6} {l rcastooth.s3_1__6}}} {u {u {l rcastooth.s4_1__6} {l rcastooth.s5_1__6}} {u {l rcastooth.s6_1__6} {l rcastooth.s7_1__6}}}} {u {u {u {l rcastooth.s8_1__6} {l rcastooth.s9_1__6}} {u {l rcastooth.s10_1_5} {l rcastooth.s11_1_4}}} {u {u {l rcastooth.s12_1_4} {l rcastooth.s13_1_3}} {u {l rcastooth.s14_1_3} {l rcastooth.s15_1_2}}}}} {u {u {u {l rcastooth.s16_1_2} {l rcastooth.s17_1_1}} {u {l rcastooth.s18_1_1} {l rcastooth.s19_1_1}}} {u {u {l rcastooth.s20_1_1_21} {l rcastooth.s21_1_1_22}} {l rcastooth.s22_1_1_23}}}}
|
||||
put {rcas14t.s1-1} comb region no tree {u {u {u {u {l rcastooth.s_1_1_3} {l rcastooth.s1_1__2}} {u {l rcastooth.s2_1__2} {l rcastooth.s3_1__2}}} {u {u {l rcastooth.s4_1__2} {l rcastooth.s5_1__2}} {u {l rcastooth.s6_1__2} {l rcastooth.s7_1__2}}}} {u {u {u {l rcastooth.s8_1__2} {l rcastooth.s9_1__2}} {u {l rcastooth.s10_1_1} {l rcastooth.s11_1_1_12}}} {l rcastooth.s12_1_1_13}}}
|
||||
put {rcas32t.s1-1} comb region no tree {u {u {u {u {u {l rcastooth.s_1_1_9} {l rcastooth.s1_1__8}} {u {l rcastooth.s2_1__8} {l rcastooth.s3_1__8}}} {u {u {l rcastooth.s4_1__8} {l rcastooth.s5_1__8}} {u {l rcastooth.s6_1__8} {l rcastooth.s7_1__8}}}} {u {u {u {l rcastooth.s8_1__8} {l rcastooth.s9_1__8}} {u {l rcastooth.s10_1_7} {l rcastooth.s11_1_6}}} {u {u {l rcastooth.s12_1_6} {l rcastooth.s13_1_5}} {u {l rcastooth.s14_1_5} {l rcastooth.s15_1_4}}}}} {u {u {u {u {l rcastooth.s16_1_4} {l rcastooth.s17_1_3}} {u {l rcastooth.s18_1_3} {l rcastooth.s19_1_3}}} {u {u {l rcastooth.s20_1_2} {l rcastooth.s21_1_2}} {u {l rcastooth.s22_1_2} {l rcastooth.s23_1_1}}}} {u {u {u {l rcastooth.s24_1_1} {l rcastooth.s25_1_1}} {u {l rcastooth.s26_1_1} {l rcastooth.s27_1_1_28}}} {u {u {l rcastooth.s28_1_1_29} {l rcastooth.s29_1_1_30}} {l rcastooth.s30_1_1_31}}}}}
|
||||
put {rcas12t.s1-1} comb region no tree {u {u {u {u {l rcastooth.s_1_1_2} {l rcastooth.s1_1__1}} {u {l rcastooth.s2_1__1} {l rcastooth.s3_1__1}}} {u {u {l rcastooth.s4_1__1} {l rcastooth.s5_1__1}} {u {l rcastooth.s6_1__1} {l rcastooth.s7_1__1}}}} {u {u {l rcastooth.s8_1__1} {l rcastooth.s9_1__1}} {l rcastooth.s10_1_1_11}}}
|
||||
put {rcas21t.s1-1} comb region no tree {u {u {u {u {u {l rcastooth.s_1_1_6} {l rcastooth.s1_1__5}} {u {l rcastooth.s2_1__5} {l rcastooth.s3_1__5}}} {u {u {l rcastooth.s4_1__5} {l rcastooth.s5_1__5}} {u {l rcastooth.s6_1__5} {l rcastooth.s7_1__5}}}} {u {u {u {l rcastooth.s8_1__5} {l rcastooth.s9_1__5}} {u {l rcastooth.s10_1_4} {l rcastooth.s11_1_3}}} {u {u {l rcastooth.s12_1_3} {l rcastooth.s13_1_2}} {u {l rcastooth.s14_1_2} {l rcastooth.s15_1_1}}}}} {u {u {l rcastooth.s16_1_1} {l rcastooth.s17_1_1_18}} {u {l rcastooth.s18_1_1_19} {l rcastooth.s19_1_1_20}}}}
|
||||
put {rcas11t.s1-1} comb region no tree {u {u {u {u {l rcastooth.s_1_1_1} {l rcastooth.s1_1_1_2}} {u {l rcastooth.s2_1_1_3} {l rcastooth.s3_1_1_4}}} {u {u {l rcastooth.s4_1_1_5} {l rcastooth.s5_1_1_6}} {u {l rcastooth.s6_1_1_7} {l rcastooth.s7_1_1_8}}}} {u {l rcastooth.s8_1_1_9} {l rcastooth.s9_1_1_10}}}
|
||||
put {rcastooth.s9_1__8} comb region no tree {l rcastooth.s {1 0 0 -16.3143 0 1 0 63.0097 0 0 1 0 0 0 0 1}}
|
||||
put {rcastooth.s8_1__8} comb region no tree {l rcastooth.s {1 0 0 -3.29663 0 1 0 65.004 0 0 1 0 0 0 0 1}}
|
||||
put {rcastooth.s9_1__7} comb region no tree {l rcastooth.s {1 0 0 -28.575 0 1 0 49.4934 0 0 1 0 0 0 0 1}}
|
||||
put {rcastooth.s7_1__8} comb region no tree {l rcastooth.s {1 0 0 9.85606 0 1 0 64.3369 0 0 1 0 0 0 0 1}}
|
||||
put {rcastooth.s8_1__7} comb region no tree {l rcastooth.s {1 0 0 -16.3908 0 1 0 54.7491 0 0 1 0 0 0 0 1}}
|
||||
put {rcastooth.s9_1__6} comb region no tree {l rcastooth.s {1 0 0 -38.1747 0 1 0 31.0574 0 0 1 0 0 0 0 1}}
|
||||
put {rcastooth.s6_1__8} comb region no tree {l rcastooth.s {1 0 0 22.6052 0 1 0 61.0359 0 0 1 0 0 0 0 1}}
|
||||
put {rcastooth.s7_1__7} comb region no tree {l rcastooth.s {1 0 0 -3.32298 0 1 0 57.0533 0 0 1 0 0 0 0 1}}
|
||||
put {rcastooth.s8_1__6} comb region no tree {l rcastooth.s {1 0 0 -28.3799 0 1 0 40.2051 0 0 1 0 0 0 0 1}}
|
||||
put {rcastooth.s5_1__8} comb region no tree {l rcastooth.s {1 0 0 34.4289 0 1 0 55.2361 0 0 1 0 0 0 0 1}}
|
||||
put {rcastooth.s9_1__5} comb region no tree {l rcastooth.s {1 0 0 -40.7647 0 1 0 13.2452 0 0 1 0 0 0 0 1}}
|
||||
put {rcastooth.s6_1__7} comb region no tree {l rcastooth.s {1 0 0 9.92399 0 1 0 56.2818 0 0 1 0 0 0 0 1}}
|
||||
put {rcastooth.s7_1__6} comb region no tree {l rcastooth.s {1 0 0 -16.4803 0 1 0 46.371 0 0 1 0 0 0 0 1}}
|
||||
put {rcastooth.s4_1__8} comb region no tree {l rcastooth.s {1 0 0 44.8431 0 1 0 47.175 0 0 1 0 0 0 0 1}}
|
||||
put {rcastooth.s8_1__5} comb region no tree {l rcastooth.s {1 0 0 -34.6765 0 1 0 25.1939 0 0 1 0 0 0 0 1}}
|
||||
put {rcastooth.s5_1__7} comb region no tree {l rcastooth.s {1 0 0 22.636 0 1 0 52.4761 0 0 1 0 0 0 0 1}}
|
||||
put {rcastooth.s9_1__4} comb region no tree {l rcastooth.s {1 0 0 -35.8908 0 1 0 -6.70915 0 0 1 0 0 0 0 1}}
|
||||
put {rcastooth.s6_1__6} comb region no tree {l rcastooth.s {1 0 0 -3.35838 0 1 0 49.0978 0 0 1 0 0 0 0 1}}
|
||||
put {rcastooth.s3_1__8} comb region no tree {l rcastooth.s {1 0 0 53.4214 0 1 0 37.1824 0 0 1 0 0 0 0 1}}
|
||||
put {rcastooth.s7_1__5} comb region no tree {l rcastooth.s {1 0 0 -25.1939 0 1 0 34.6765 0 0 1 0 0 0 0 1}}
|
||||
put {rcastooth.s4_1__7} comb region no tree {l rcastooth.s {1 0 0 34.1276 0 1 0 45.8413 0 0 1 0 0 0 0 1}}
|
||||
put {rcastooth.s8_1__4} comb region no tree {l rcastooth.s {1 0 0 -35.8908 0 1 0 6.70915 0 0 1 0 0 0 0 1}}
|
||||
put {rcastooth.s5_1__6} comb region no tree {l rcastooth.s {1 0 0 10.0126 0 1 0 48.1832 0 0 1 0 0 0 0 1}}
|
||||
put {rcastooth.s2_1__8} comb region no tree {l rcastooth.s {1 0 0 59.8127 0 1 0 25.6676 0 0 1 0 0 0 0 1}}
|
||||
put {rcastooth.s9_1__3} comb region no tree {l rcastooth.s {1 0 0 -26.4569 0 1 0 -19.222 0 0 1 0 0 0 0 1}}
|
||||
put {rcastooth.s6_1__5} comb region no tree {l rcastooth.s {1 0 0 -13.2452 0 1 0 40.7647 0 0 1 0 0 0 0 1}}
|
||||
put {rcastooth.s3_1__7} comb region no tree {l rcastooth.s {1 0 0 43.7794 0 1 0 36.7353 0 0 1 0 0 0 0 1}}
|
||||
put {rcastooth.s7_1__4} comb region no tree {l rcastooth.s {1 0 0 -31.0436 0 1 0 19.2214 0 0 1 0 0 0 0 1}}
|
||||
put {rcastooth.s4_1__6} comb region no tree {l rcastooth.s {1 0 0 22.641 0 1 0 43.6951 0 0 1 0 0 0 0 1}}
|
||||
put {rcastooth.s1_1__8} comb region no tree {l rcastooth.s {1 0 0 63.7552 0 1 0 13.102 0 0 1 0 0 0 0 1}}
|
||||
put {rcastooth.s8_1__3} comb region no tree {l rcastooth.s {1 0 0 -31.9879 0 1 0 -6.79923 0 0 1 0 0 0 0 1}}
|
||||
put {rcastooth.s5_1__5} comb region no tree {l rcastooth.s {1 0 0 -2.18745e-10 0 1 0 42.8625 0 0 1 0 0 0 0 1}}
|
||||
put {rcastooth.s2_1__7} comb region no tree {l rcastooth.s {1 0 0 51.0711 0 1 0 25.6489 0 0 1 0 0 0 0 1}}
|
||||
put {rcastooth.s9_1__2} comb region no tree {l rcastooth.s {1 0 0 -10.2229 0 1 0 -26.9556 0 0 1 0 0 0 0 1}}
|
||||
put {rcastooth.s6_1__4} comb region no tree {l rcastooth.s {1 0 0 -22.0037 0 1 0 29.1376 0 0 1 0 0 0 0 1}}
|
||||
put {rcastooth.s3_1__6} comb region no tree {l rcastooth.s {1 0 0 33.5901 0 1 0 35.9663 0 0 1 0 0 0 0 1}}
|
||||
put {rcastooth.s7_1__3} comb region no tree {l rcastooth.s {1 0 0 -31.9879 0 1 0 6.79923 0 0 1 0 0 0 0 1}}
|
||||
put {rcastooth.s4_1__5} comb region no tree {l rcastooth.s {1 0 0 13.2452 0 1 0 40.7647 0 0 1 0 0 0 0 1}}
|
||||
put {rcastooth.s1_1__7} comb region no tree {l rcastooth.s {1 0 0 55.6095 0 1 0 13.1797 0 0 1 0 0 0 0 1}}
|
||||
put {rcastooth.s8_1__2} comb region no tree {l rcastooth.s {1 0 0 -21.5788 0 1 0 -19.1172 0 0 1 0 0 0 0 1}}
|
||||
put {rcastooth.s5_1__4} comb region no tree {l rcastooth.s {1 0 0 -9.99212 0 1 0 35.1187 0 0 1 0 0 0 0 1}}
|
||||
put {rcastooth.s2_1__6} comb region no tree {l rcastooth.s {1 0 0 42.0481 0 1 0 25.57 0 0 1 0 0 0 0 1}}
|
||||
put {rcastooth.s9_1__1} comb region no tree {l rcastooth.s {1 0 0 10.2878 0 1 0 -22.527 0 0 1 0 0 0 0 1}}
|
||||
put {rcastooth.s6_1__3} comb region no tree {l rcastooth.s {1 0 0 -26.4569 0 1 0 19.222 0 0 1 0 0 0 0 1}}
|
||||
put {rcastooth.s3_1__5} comb region no tree {l rcastooth.s {1 0 0 25.1939 0 1 0 34.6765 0 0 1 0 0 0 0 1}}
|
||||
put {rcastooth.s7_1__2} comb region no tree {l rcastooth.s {1 0 0 -27.9913 0 1 0 -6.89923 0 0 1 0 0 0 0 1}}
|
||||
put {rcastooth.s4_1__4} comb region no tree {l rcastooth.s {1 0 0 3.36895 0 1 0 36.3567 0 0 1 0 0 0 0 1}}
|
||||
put {rcastooth.s1_1__6} comb region no tree {l rcastooth.s {1 0 0 47.3876 0 1 0 13.2774 0 0 1 0 0 0 0 1}}
|
||||
put {rcastooth.s8_1__1} comb region no tree {l rcastooth.s {1 0 0 -3.52443 0 1 0 -24.5129 0 0 1 0 0 0 0 1}}
|
||||
put {rcastooth.s5_1__3} comb region no tree {l rcastooth.s {1 0 0 -16.3513 0 1 0 28.3212 0 0 1 0 0 0 0 1}}
|
||||
put {rcastooth.s2_1__5} comb region no tree {l rcastooth.s {1 0 0 34.6765 0 1 0 25.1939 0 0 1 0 0 0 0 1}}
|
||||
put {rcastooth.s6_1__2} comb region no tree {l rcastooth.s {1 0 0 -27.9913 0 1 0 6.89923 0 0 1 0 0 0 0 1}}
|
||||
put {rcastooth.s3_1__4} comb region no tree {l rcastooth.s {1 0 0 16.275 0 1 0 32.6846 0 0 1 0 0 0 0 1}}
|
||||
put {rcastooth.s7_1__1} comb region no tree {l rcastooth.s {1 0 0 -16.2176 0 1 0 -18.7161 0 0 1 0 0 0 0 1}}
|
||||
put {rcastooth.s4_1__3} comb region no tree {l rcastooth.s {1 0 0 -3.41834 0 1 0 32.5234 0 0 1 0 0 0 0 1}}
|
||||
put {rcastooth.s1_1__5} comb region no tree {l rcastooth.s {1 0 0 40.7647 0 1 0 13.2452 0 0 1 0 0 0 0 1}}
|
||||
put {rcastooth.s5_1__2} comb region no tree {l rcastooth.s {1 0 0 -21.5788 0 1 0 19.1172 0 0 1 0 0 0 0 1}}
|
||||
put {rcastooth.s2_1__4} comb region no tree {l rcastooth.s {1 0 0 26.9831 0 1 0 24.5983 0 0 1 0 0 0 0 1}}
|
||||
put {rcastooth.s6_1__1} comb region no tree {l rcastooth.s {1 0 0 -23.7618 0 1 0 -6.97711 0 0 1 0 0 0 0 1}}
|
||||
put {rcastooth.s3_1__3} comb region no tree {l rcastooth.s {1 0 0 10.1056 0 1 0 31.1019 0 0 1 0 0 0 0 1}}
|
||||
put {rcastooth.s4_1__2} comb region no tree {l rcastooth.s {1 0 0 -10.2229 0 1 0 26.9556 0 0 1 0 0 0 0 1}}
|
||||
put {rcastooth.s1_1__4} comb region no tree {l rcastooth.s {1 0 0 34.0469 0 1 0 13.1898 0 0 1 0 0 0 0 1}}
|
||||
put {rcastooth.s5_1__1} comb region no tree {l rcastooth.s {1 0 0 -23.7618 0 1 0 6.97711 0 0 1 0 0 0 0 1}}
|
||||
put {rcastooth.s2_1__3} comb region no tree {l rcastooth.s {1 0 0 21.8822 0 1 0 24.3027 0 0 1 0 0 0 0 1}}
|
||||
put {rcastooth.s_1_1_9} comb region no tree {l rcastooth.s {1 0 0 65.0875 0 1 0 0 0 0 1 0 0 0 0 1}}
|
||||
put {rcastooth.s3_1__2} comb region no tree {l rcastooth.s {1 0 0 3.47495 0 1 0 28.6188 0 0 1 0 0 0 0 1}}
|
||||
put {rcastooth.s4_1__1} comb region no tree {l rcastooth.s {1 0 0 -16.2176 0 1 0 18.7161 0 0 1 0 0 0 0 1}}
|
||||
put {rcastooth.s1_1__3} comb region no tree {l rcastooth.s {1 0 0 29.8752 0 1 0 13.3013 0 0 1 0 0 0 0 1}}
|
||||
put {rcastooth.s2_1__2} comb region no tree {l rcastooth.s {1 0 0 16.3767 0 1 0 23.7258 0 0 1 0 0 0 0 1}}
|
||||
put {rcastooth.s_1_1_8} comb region no tree {l rcastooth.s {1 0 0 57.15 0 1 0 0 0 0 1 0 0 0 0 1}}
|
||||
put {rcastooth.s3_1__1} comb region no tree {l rcastooth.s {1 0 0 -3.52443 0 1 0 24.5129 0 0 1 0 0 0 0 1}}
|
||||
put {rcastooth.s1_1__2} comb region no tree {l rcastooth.s {1 0 0 25.5268 0 1 0 13.3975 0 0 1 0 0 0 0 1}}
|
||||
put {rcastooth.s2_1__1} comb region no tree {l rcastooth.s {1 0 0 10.2878 0 1 0 22.527 0 0 1 0 0 0 0 1}}
|
||||
put {rcastooth.s_1_1_7} comb region no tree {l rcastooth.s {1 0 0 49.2125 0 1 0 0 0 0 1 0 0 0 0 1}}
|
||||
put {rcastooth.s1_1__1} comb region no tree {l rcastooth.s {1 0 0 20.8336 0 1 0 13.389 0 0 1 0 0 0 0 1}}
|
||||
put {rcastooth.s_1_1_6} comb region no tree {l rcastooth.s {1 0 0 42.8625 0 1 0 0 0 0 1 0 0 0 0 1}}
|
||||
put {rcastooth.s_1_1_5} comb region no tree {l rcastooth.s {1 0 0 36.5125 0 1 0 0 0 0 1 0 0 0 0 1}}
|
||||
put {rcastooth.s_1_1_4} comb region no tree {l rcastooth.s {1 0 0 32.7025 0 1 0 0 0 0 1 0 0 0 0 1}}
|
||||
put {rcastooth.s_1_1_3} comb region no tree {l rcastooth.s {1 0 0 28.829 0 1 0 0 0 0 1 0 0 0 0 1}}
|
||||
put {rcastooth.s_1_1_2} comb region no tree {l rcastooth.s {1 0 0 24.765 0 1 0 0 0 0 1 0 0 0 0 1}}
|
||||
put {rcastooth.s_1_1_1} comb region no tree {l rcastooth.s {1 0 0 22.86 0 1 0 0 0 0 1 0 0 0 0 1}}
|
||||
put {rcas28t.s1} tgc V {0 0 0} H {0 0 1.651000000000000023092639} A {0 -57.14999999999999857891453 0} B {57.14999999999999857891453 0 0} C {0 -57.14999999999999857891453 0} D {57.14999999999999857891453 0 0}
|
||||
put {rcas18t.s1} tgc V {0 0 0} H {0 0 1.651000000000000023092639} A {0 -36.51249999999999573674359 0} B {36.51249999999999573674359 0 0} C {0 -36.51249999999999573674359 0} D {36.51249999999999573674359 0 0}
|
||||
put {spkl_1_1_9} comb region no tree {l spkl {0.766044 0.642788 0 0 -0.642788 0.766044 0 0 0 0 1 0 0 0 0 1}}
|
||||
put {spkk_1_1_9} comb region no tree {l spkk {0.766044 0.642788 0 0 -0.642788 0.766044 0 0 0 0 1 0 0 0 0 1}}
|
||||
put {rcas16t.s1} tgc V {0 0 0} H {0 0 1.651000000000000023092639} A {0 -32.70250000000000056843419 0} B {32.70250000000000056843419 0 0} C {0 -32.70250000000000056843419 0} D {32.70250000000000056843419 0 0}
|
||||
put {spkj_1_1_9} comb region no tree {l spkj {0.766044 0.642788 0 0 -0.642788 0.766044 0 0 0 0 1 0 0 0 0 1}}
|
||||
put {spkl_1_1_8} comb region no tree {l spkl {0.173648 0.984808 0 0 -0.984808 0.173648 0 0 0 0 1 0 0 0 0 1}}
|
||||
put {spki_1_1_9} comb region no tree {l spki {0.766044 0.642788 0 0 -0.642788 0.766044 0 0 0 0 1 0 0 0 0 1}}
|
||||
put {rcas24t.s1} tgc V {0 0 0} H {0 0 1.651000000000000023092639} A {0 -49.21249999999999857891453 0} B {49.21249999999999857891453 0 0} C {0 -49.21249999999999857891453 0} D {49.21249999999999857891453 0 0}
|
||||
put {spkk_1_1_8} comb region no tree {l spkk {0.173648 0.984808 0 0 -0.984808 0.173648 0 0 0 0 1 0 0 0 0 1}}
|
||||
put {spkj_1_1_8} comb region no tree {l spkj {0.173648 0.984808 0 0 -0.984808 0.173648 0 0 0 0 1 0 0 0 0 1}}
|
||||
put {rcas14t.s1} tgc V {0 0 0} H {0 0 1.651000000000000023092639} A {0 -28.82899999999999707256393 0} B {28.82899999999999707256393 0 0} C {0 -28.82899999999999707256393 0} D {28.82899999999999707256393 0 0}
|
||||
put {spkl_1_1_7} comb region no tree {l spkl {-0.5 0.866025 0 0 -0.866025 -0.5 0 0 0 0 1 0 0 0 0 1}}
|
||||
put {rcas32t.s1} tgc V {0 0 0} H {0 0 1.651000000000000023092639} A {0 -65.08749999999999147348717 0} B {65.08749999999999147348717 0 0} C {0 -65.08749999999999147348717 0} D {65.08749999999999147348717 0 0}
|
||||
put {spki_1_1_8} comb region no tree {l spki {0.173648 0.984808 0 0 -0.984808 0.173648 0 0 0 0 1 0 0 0 0 1}}
|
||||
put {spkk_1_1_7} comb region no tree {l spkk {-0.5 0.866025 0 0 -0.866025 -0.5 0 0 0 0 1 0 0 0 0 1}}
|
||||
put {spkj_1_1_7} comb region no tree {l spkj {-0.5 0.866025 0 0 -0.866025 -0.5 0 0 0 0 1 0 0 0 0 1}}
|
||||
put {spkl_1_1_6} comb region no tree {l spkl {-0.939693 0.34202 0 0 -0.34202 -0.939693 0 0 0 0 1 0 0 0 0 1}}
|
||||
put {rcas12t.s1} tgc V {0 0 0} H {0 0 1.651000000000000023092639} A {0 -24.76499999999999701572051 0} B {24.76499999999999701572051 0 0} C {0 -24.76499999999999701572051 0} D {24.76499999999999701572051 0 0}
|
||||
put {rcas21t.s1} tgc V {0 0 0} H {0 0 1.651000000000000023092639} A {0 -42.86249999999999715782906 0} B {42.86249999999999715782906 0 0} C {0 -42.86249999999999715782906 0} D {42.86249999999999715782906 0 0}
|
||||
put {spki_1_1_7} comb region no tree {l spki {-0.5 0.866025 0 0 -0.866025 -0.5 0 0 0 0 1 0 0 0 0 1}}
|
||||
put {spkk_1_1_6} comb region no tree {l spkk {-0.939693 0.34202 0 0 -0.34202 -0.939693 0 0 0 0 1 0 0 0 0 1}}
|
||||
put {rcas11t.s1} tgc V {0 0 0} H {0 0 1.651000000000000023092639} A {0 -22.85999999999999943156581 0} B {22.85999999999999943156581 0 0} C {0 -22.85999999999999943156581 0} D {22.85999999999999943156581 0 0}
|
||||
put {spkj_1_1_6} comb region no tree {l spkj {-0.939693 0.34202 0 0 -0.34202 -0.939693 0 0 0 0 1 0 0 0 0 1}}
|
||||
put {spkl_1_1_5} comb region no tree {l spkl {-0.939693 -0.34202 0 0 0.34202 -0.939693 0 0 0 0 1 0 0 0 0 1}}
|
||||
put {spki_1_1_6} comb region no tree {l spki {-0.939693 0.34202 0 0 -0.34202 -0.939693 0 0 0 0 1 0 0 0 0 1}}
|
||||
put {spkk_1_1_5} comb region no tree {l spkk {-0.939693 -0.34202 0 0 0.34202 -0.939693 0 0 0 0 1 0 0 0 0 1}}
|
||||
put {spkj_1_1_5} comb region no tree {l spkj {-0.939693 -0.34202 0 0 0.34202 -0.939693 0 0 0 0 1 0 0 0 0 1}}
|
||||
put {spkl_1_1_4} comb region no tree {l spkl {-0.5 -0.866025 0 0 0.866025 -0.5 0 0 0 0 1 0 0 0 0 1}}
|
||||
put {spki_1_1_5} comb region no tree {l spki {-0.939693 -0.34202 0 0 0.34202 -0.939693 0 0 0 0 1 0 0 0 0 1}}
|
||||
put {spkk_1_1_4} comb region no tree {l spkk {-0.5 -0.866025 0 0 0.866025 -0.5 0 0 0 0 1 0 0 0 0 1}}
|
||||
put {spkj_1_1_4} comb region no tree {l spkj {-0.5 -0.866025 0 0 0.866025 -0.5 0 0 0 0 1 0 0 0 0 1}}
|
||||
put {spkl_1_1_3} comb region no tree {l spkl {0.173648 -0.984808 0 0 0.984808 0.173648 0 0 0 0 1 0 0 0 0 1}}
|
||||
put {spki_1_1_4} comb region no tree {l spki {-0.5 -0.866025 0 0 0.866025 -0.5 0 0 0 0 1 0 0 0 0 1}}
|
||||
put {spkk_1_1_3} comb region no tree {l spkk {0.173648 -0.984808 0 0 0.984808 0.173648 0 0 0 0 1 0 0 0 0 1}}
|
||||
put {spkj_1_1_3} comb region no tree {l spkj {0.173648 -0.984808 0 0 0.984808 0.173648 0 0 0 0 1 0 0 0 0 1}}
|
||||
put {spkl_1_1_2} comb region no tree {l spkl {0.766044 -0.642788 0 0 0.642788 0.766044 0 0 0 0 1 0 0 0 0 1}}
|
||||
put {spki_1_1_3} comb region no tree {l spki {0.173648 -0.984808 0 0 0.984808 0.173648 0 0 0 0 1 0 0 0 0 1}}
|
||||
put {spkk_1_1_2} comb region no tree {l spkk {0.766044 -0.642788 0 0 0.642788 0.766044 0 0 0 0 1 0 0 0 0 1}}
|
||||
put {spkj_1_1_2} comb region no tree {l spkj {0.766044 -0.642788 0 0 0.642788 0.766044 0 0 0 0 1 0 0 0 0 1}}
|
||||
put {rcastooth.s19_1_3} comb region no tree {l rcastooth.s {1 0 0 -49.3857 0 1 0 -42.3962 0 0 1 0 0 0 0 1}}
|
||||
put {spkl_1_1_1} comb region no tree {l spkl}
|
||||
put {spki_1_1_2} comb region no tree {l spki {0.766044 -0.642788 0 0 0.642788 0.766044 0 0 0 0 1 0 0 0 0 1}}
|
||||
put {spkk_1_1_1} comb region no tree {l spkk}
|
||||
put {spkj_1_1_1} comb region no tree {l spkj}
|
||||
put {spki_1_1_1} comb region no tree {l spki}
|
||||
put {rcastooth.s18_1_3} comb region no tree {l rcastooth.s {1 0 0 -56.909 0 1 0 -31.5871 0 0 1 0 0 0 0 1}}
|
||||
put {rcastooth.s19_1_2} comb region no tree {l rcastooth.s {1 0 0 -16.3908 0 1 0 -54.7491 0 0 1 0 0 0 0 1}}
|
||||
put {rcastooth.s16_1_4} comb region no tree {l rcastooth.s {1 0 0 -64.7536 0 1 0 -6.58479 0 0 1 0 0 0 0 1}}
|
||||
put {rcastooth.s17_1_3} comb region no tree {l rcastooth.s {1 0 0 -62.1025 0 1 0 -19.4848 0 0 1 0 0 0 0 1}}
|
||||
put {rcastooth.s18_1_2} comb region no tree {l rcastooth.s {1 0 0 -28.575 0 1 0 -49.4934 0 0 1 0 0 0 0 1}}
|
||||
put {rcastooth.s14_1_5} comb region no tree {l rcastooth.s {1 0 0 -62.1025 0 1 0 19.4848 0 0 1 0 0 0 0 1}}
|
||||
put {rcastooth.s19_1_1} comb region no tree {l rcastooth.s {1 0 0 22.641 0 1 0 -43.6951 0 0 1 0 0 0 0 1}}
|
||||
put {rcastooth.s15_1_4} comb region no tree {l rcastooth.s {1 0 0 -64.7536 0 1 0 6.58479 0 0 1 0 0 0 0 1}}
|
||||
put {rcastooth.s16_1_3} comb region no tree {l rcastooth.s {1 0 0 -47.7481 0 1 0 -31.4044 0 0 1 0 0 0 0 1}}
|
||||
put {rcastooth.s12_1_6} comb region no tree {l rcastooth.s {1 0 0 -49.3857 0 1 0 42.3962 0 0 1 0 0 0 0 1}}
|
||||
put {rcastooth.s17_1_2} comb region no tree {l rcastooth.s {1 0 0 -39.2187 0 1 0 -41.5694 0 0 1 0 0 0 0 1}}
|
||||
put {rcastooth.s13_1_5} comb region no tree {l rcastooth.s {1 0 0 -56.909 0 1 0 31.5871 0 0 1 0 0 0 0 1}}
|
||||
put {rcastooth.s18_1_1} comb region no tree {l rcastooth.s {1 0 0 10.0126 0 1 0 -48.1832 0 0 1 0 0 0 0 1}}
|
||||
put {rcastooth.s14_1_4} comb region no tree {l rcastooth.s {1 0 0 -56.7636 0 1 0 -6.63471 0 0 1 0 0 0 0 1}}
|
||||
put {rcastooth.s10_1_7} comb region no tree {l rcastooth.s {1 0 0 -28.6642 0 1 0 58.4359 0 0 1 0 0 0 0 1}}
|
||||
put {rrim.s1sh} tgc V {177.7999999999999829469743 0 11.81099999999999994315658} H {38.09999999999999431565811 0 0} A {0 0 -2.285999999999999587885213} B {0 2.285999999999999587885213 0} C {0 0 -2.285999999999999587885213} D {0 2.285999999999999587885213 0}
|
||||
put {rcastooth.s15_1_3} comb region no tree {l rcastooth.s {1 0 0 -53.7034 0 1 0 -19.5465 0 0 1 0 0 0 0 1}}
|
||||
put {rcastooth.s11_1_6} comb region no tree {l rcastooth.s {1 0 0 -39.8404 0 1 0 51.4696 0 0 1 0 0 0 0 1}}
|
||||
put {rcas28t.c1} comb region no tree {- {l rcas28t.s1 {1 0 0 0 0 1 0 0 0 0 1 31.892875 0 0 0 1}} {l rcas28t.s1-1 {1 0 0 0 0 1 0 0 0 0 1 31.892875 0 0 0 1}}}
|
||||
put {rcastooth.s16_1_2} comb region no tree {l rcastooth.s {1 0 0 -16.4803 0 1 0 -46.371 0 0 1 0 0 0 0 1}}
|
||||
put {rcastooth.s12_1_5} comb region no tree {l rcastooth.s {1 0 0 -53.7034 0 1 0 19.5465 0 0 1 0 0 0 0 1}}
|
||||
put {rcas18t.c1} comb region no tree {- {l rcas18t.s1 {1 0 0 0 0 1 0 0 0 0 1 18.2245 0 0 0 1}} {l rcas18t.s1-1 {1 0 0 0 0 1 0 0 0 0 1 18.2245 0 0 0 1}}}
|
||||
put {rcastooth.s17_1_1} comb region no tree {l rcastooth.s {1 0 0 -3.35838 0 1 0 -49.0978 0 0 1 0 0 0 0 1}}
|
||||
put {rcastooth.s26_1_1} comb region no tree {l rcastooth.s {1 0 0 34.4289 0 1 0 -55.2361 0 0 1 0 0 0 0 1}}
|
||||
put {rcastooth.s13_1_4} comb region no tree {l rcastooth.s {1 0 0 -56.7636 0 1 0 6.63471 0 0 1 0 0 0 0 1}}
|
||||
put {rcastooth.s14_1_3} comb region no tree {l rcastooth.s {1 0 0 -38.1747 0 1 0 -31.0574 0 0 1 0 0 0 0 1}}
|
||||
put {rcastooth.s10_1_6} comb region no tree {l rcastooth.s {1 0 0 -39.2187 0 1 0 41.5694 0 0 1 0 0 0 0 1}}
|
||||
put {rcastooth.s15_1_2} comb region no tree {l rcastooth.s {1 0 0 -28.3799 0 1 0 -40.2051 0 0 1 0 0 0 0 1}}
|
||||
put {rcastooth.s11_1_5} comb region no tree {l rcastooth.s {1 0 0 -47.7481 0 1 0 31.4044 0 0 1 0 0 0 0 1}}
|
||||
put {rcas16t.c1} comb region no tree {- {l rcas16t.s1 {1 0 0 0 0 1 0 0 0 0 1 13.668375 0 0 0 1}} {l rcas16t.s1-1 {1 0 0 0 0 1 0 0 0 0 1 13.668375 0 0 0 1}}}
|
||||
put {rcastooth.s16_1_1} comb region no tree {l rcastooth.s {1 0 0 13.2452 0 1 0 -40.7647 0 0 1 0 0 0 0 1}}
|
||||
put {rcastooth.s25_1_1} comb region no tree {l rcastooth.s {1 0 0 22.6052 0 1 0 -61.0359 0 0 1 0 0 0 0 1}}
|
||||
put {rcastooth.s12_1_4} comb region no tree {l rcastooth.s {1 0 0 -48.7541 0 1 0 -6.7011 0 0 1 0 0 0 0 1}}
|
||||
put {rcas24t.c1} comb region no tree {- {l rcas24t.s1 {1 0 0 0 0 1 0 0 0 0 1 27.33675 0 0 0 1}} {l rcas24t.s1-1 {1 0 0 0 0 1 0 0 0 0 1 27.33675 0 0 0 1}}}
|
||||
put {rcastooth.s13_1_3} comb region no tree {l rcastooth.s {1 0 0 -45.1383 0 1 0 -19.6063 0 0 1 0 0 0 0 1}}
|
||||
put {rcastooth.s14_1_2} comb region no tree {l rcastooth.s {1 0 0 -13.2452 0 1 0 -40.7647 0 0 1 0 0 0 0 1}}
|
||||
put {rcastooth.s10_1_5} comb region no tree {l rcastooth.s {1 0 0 -45.1383 0 1 0 19.6063 0 0 1 0 0 0 0 1}}
|
||||
put {rcas14t.c1} comb region no tree {- {l rcas14t.s1 {1 0 0 0 0 1 0 0 0 0 1 9.11225 0 0 0 1}} {l rcas14t.s1-1 {1 0 0 0 0 1 0 0 0 0 1 9.11225 0 0 0 1}}}
|
||||
put {rcas32t.c1} comb region no tree {- {l rcas32t.s1 {1 0 0 0 0 1 0 0 0 0 1 36.449 0 0 0 1}} {l rcas32t.s1-1 {1 0 0 0 0 1 0 0 0 0 1 36.449 0 0 0 1}}}
|
||||
put {rcastooth.s15_1_1} comb region no tree {l rcastooth.s {1 0 0 2.2761e-10 0 1 0 -42.8625 0 0 1 0 0 0 0 1}}
|
||||
put {rcastooth.s24_1_1} comb region no tree {l rcastooth.s {1 0 0 9.85606 0 1 0 -64.3369 0 0 1 0 0 0 0 1}}
|
||||
put {rcastooth.s11_1_4} comb region no tree {l rcastooth.s {1 0 0 -48.7541 0 1 0 6.7011 0 0 1 0 0 0 0 1}}
|
||||
put {rcastooth.s12_1_3} comb region no tree {l rcastooth.s {1 0 0 -34.6765 0 1 0 -25.1939 0 0 1 0 0 0 0 1}}
|
||||
put {rcastooth.s13_1_2} comb region no tree {l rcastooth.s {1 0 0 -25.1939 0 1 0 -34.6765 0 0 1 0 0 0 0 1}}
|
||||
put {rcas12t.c1} comb region no tree {- {l rcas12t.s1 {1 0 0 0 0 1 0 0 0 0 1 4.556125 0 0 0 1}} {l rcas12t.s1-1 {1 0 0 0 0 1 0 0 0 0 1 4.556125 0 0 0 1}}}
|
||||
put {rcastooth.s22_1_2} comb region no tree {l rcastooth.s {1 0 0 -16.3143 0 1 0 -63.0097 0 0 1 0 0 0 0 1}}
|
||||
put {rcas21t.c1} comb region no tree {- {l rcas21t.s1 {1 0 0 0 0 1 0 0 0 0 1 22.780625 0 0 0 1}} {l rcas21t.s1-1 {1 0 0 0 0 1 0 0 0 0 1 22.780625 0 0 0 1}}}
|
||||
put {rcastooth.s14_1_1} comb region no tree {l rcastooth.s {1 0 0 16.275 0 1 0 -32.6846 0 0 1 0 0 0 0 1}}
|
||||
put {rcastooth.s23_1_1} comb region no tree {l rcastooth.s {1 0 0 -3.29663 0 1 0 -65.004 0 0 1 0 0 0 0 1}}
|
||||
put {rcastooth.s10_1_4} comb region no tree {l rcastooth.s {1 0 0 -42.8625 0 1 0 -8.86496e-12 0 0 1 0 0 0 0 1}}
|
||||
put {rcas11t.c1} comb region no tree {- {l rcas11t.s1} {l rcas11t.s1-1}}
|
||||
put {rcastooth.s11_1_3} comb region no tree {l rcastooth.s {1 0 0 -40.7647 0 1 0 -13.2452 0 0 1 0 0 0 0 1}}
|
||||
put {rcastooth.s12_1_2} comb region no tree {l rcastooth.s {1 0 0 -9.99212 0 1 0 -35.1187 0 0 1 0 0 0 0 1}}
|
||||
put {rcastooth.s21_1_2} comb region no tree {l rcastooth.s {1 0 0 -28.6642 0 1 0 -58.4359 0 0 1 0 0 0 0 1}}
|
||||
put {rcastooth.s13_1_1} comb region no tree {l rcastooth.s {1 0 0 3.36895 0 1 0 -36.3567 0 0 1 0 0 0 0 1}}
|
||||
put {rcastooth.s22_1_1} comb region no tree {l rcastooth.s {1 0 0 22.636 0 1 0 -52.4761 0 0 1 0 0 0 0 1}}
|
||||
put {rcastooth.s10_1_3} comb region no tree {l rcastooth.s {1 0 0 -31.0436 0 1 0 -19.2214 0 0 1 0 0 0 0 1}}
|
||||
put {rcastooth.s11_1_2} comb region no tree {l rcastooth.s {1 0 0 -22.0037 0 1 0 -29.1376 0 0 1 0 0 0 0 1}}
|
||||
put {rcastooth.s20_1_2} comb region no tree {l rcastooth.s {1 0 0 -39.8404 0 1 0 -51.4696 0 0 1 0 0 0 0 1}}
|
||||
put {rcastooth.s12_1_1} comb region no tree {l rcastooth.s {1 0 0 10.1056 0 1 0 -31.1019 0 0 1 0 0 0 0 1}}
|
||||
put {rcastooth.s21_1_1} comb region no tree {l rcastooth.s {1 0 0 9.92399 0 1 0 -56.2818 0 0 1 0 0 0 0 1}}
|
||||
put {rcastooth.s10_1_2} comb region no tree {l rcastooth.s {1 0 0 -16.3512 0 1 0 -28.3212 0 0 1 0 0 0 0 1}}
|
||||
put {rcastooth.s11_1_1} comb region no tree {l rcastooth.s {1 0 0 -3.41834 0 1 0 -32.5234 0 0 1 0 0 0 0 1}}
|
||||
put {rcastooth.s20_1_1} comb region no tree {l rcastooth.s {1 0 0 -3.32298 0 1 0 -57.0533 0 0 1 0 0 0 0 1}}
|
||||
put {rcastooth.s10_1_1} comb region no tree {l rcastooth.s {1 0 0 3.47495 0 1 0 -28.6188 0 0 1 0 0 0 0 1}}
|
||||
put {rtire.s1-1} eto V {0 0 11.81099999999999994315658} N {0 0 25.39999999999999857891453} C {15.87499999999999822364316 0 0} r 222.25 r_d 14.28749999999999964472863
|
||||
put {spokes.r} comb region yes tree {u {u {l spoke_A} {l spoke_b}} {u {l spoke_c} {l spoke_d}}}
|
||||
attr set {spokes.r} {region} {R} {region_id} {1000} {material_id} {1} {los} {100}
|
||||
put {rrim.s29sh_1_1_29} comb region no tree {l rrim.s1sh {0.173648 0.984808 0 0 -0.984808 0.173648 0 0 0 0 1 0 0 0 0 1}}
|
||||
put {rrim.s19sh_1_1_19} comb region no tree {l rrim.s1sh {-1 -9.79318e-12 0 0 9.79318e-12 -1 0 0 0 0 1 0 0 0 0 1}}
|
||||
put {rrim.s28sh_1_1_28} comb region no tree {l rrim.s1sh {-1.46898e-11 1 0 0 -1 -1.46898e-11 0 0 0 0 1 0 0 0 0 1}}
|
||||
put {rrim.s18sh_1_1_18} comb region no tree {l rrim.s1sh {-0.984808 -0.173648 0 0 0.173648 -0.984808 0 0 0 0 1 0 0 0 0 1}}
|
||||
put {rrim.s27sh_1_1_27} comb region no tree {l rrim.s1sh {-0.173648 0.984808 0 0 -0.984808 -0.173648 0 0 0 0 1 0 0 0 0 1}}
|
||||
put {rrim.s36sh_1_1_36} comb region no tree {l rrim.s1sh {0.984808 0.173648 0 0 -0.173648 0.984808 0 0 0 0 1 0 0 0 0 1}}
|
||||
put {rrim.s17sh_1_1_17} comb region no tree {l rrim.s1sh {-0.939693 -0.34202 0 0 0.34202 -0.939693 0 0 0 0 1 0 0 0 0 1}}
|
||||
put {rrim.s26sh_1_1_26} comb region no tree {l rrim.s1sh {-0.34202 0.939693 0 0 -0.939693 -0.34202 0 0 0 0 1 0 0 0 0 1}}
|
||||
put {rrim.s35sh_1_1_35} comb region no tree {l rrim.s1sh {0.939693 0.34202 0 0 -0.34202 0.939693 0 0 0 0 1 0 0 0 0 1}}
|
||||
put {rrim.s16sh_1_1_16} comb region no tree {l rrim.s1sh {-0.866025 -0.5 0 0 0.5 -0.866025 0 0 0 0 1 0 0 0 0 1}}
|
||||
put {rrim.s25sh_1_1_25} comb region no tree {l rrim.s1sh {-0.5 0.866025 0 0 -0.866025 -0.5 0 0 0 0 1 0 0 0 0 1}}
|
||||
put {rrim.s34sh_1_1_34} comb region no tree {l rrim.s1sh {0.866025 0.5 0 0 -0.5 0.866025 0 0 0 0 1 0 0 0 0 1}}
|
||||
put {rrim.s15sh_1_1_15} comb region no tree {l rrim.s1sh {-0.766044 -0.642788 0 0 0.642788 -0.766044 0 0 0 0 1 0 0 0 0 1}}
|
||||
put {rrim.s24sh_1_1_24} comb region no tree {l rrim.s1sh {-0.642788 0.766044 0 0 -0.766044 -0.642788 0 0 0 0 1 0 0 0 0 1}}
|
||||
put {rrim.s33sh_1_1_33} comb region no tree {l rrim.s1sh {0.766044 0.642788 0 0 -0.642788 0.766044 0 0 0 0 1 0 0 0 0 1}}
|
||||
put {rrim.s14sh_1_1_14} comb region no tree {l rrim.s1sh {-0.642788 -0.766044 0 0 0.766044 -0.642788 0 0 0 0 1 0 0 0 0 1}}
|
||||
put {rrim.s23sh_1_1_23} comb region no tree {l rrim.s1sh {-0.766044 0.642788 0 0 -0.642788 -0.766044 0 0 0 0 1 0 0 0 0 1}}
|
||||
put {rrim.s32sh_1_1_32} comb region no tree {l rrim.s1sh {0.642788 0.766044 0 0 -0.766044 0.642788 0 0 0 0 1 0 0 0 0 1}}
|
||||
put {rrim.s13sh_1_1_13} comb region no tree {l rrim.s1sh {-0.5 -0.866025 0 0 0.866025 -0.5 0 0 0 0 1 0 0 0 0 1}}
|
||||
put {rrim.s22sh_1_1_22} comb region no tree {l rrim.s1sh {-0.866025 0.5 0 0 -0.5 -0.866025 0 0 0 0 1 0 0 0 0 1}}
|
||||
put {rrim.s31sh_1_1_31} comb region no tree {l rrim.s1sh {0.5 0.866025 0 0 -0.866025 0.5 0 0 0 0 1 0 0 0 0 1}}
|
||||
put {rrim.s12sh_1_1_12} comb region no tree {l rrim.s1sh {-0.34202 -0.939693 0 0 0.939693 -0.34202 0 0 0 0 1 0 0 0 0 1}}
|
||||
put {rrim.s21sh_1_1_21} comb region no tree {l rrim.s1sh {-0.939693 0.34202 0 0 -0.34202 -0.939693 0 0 0 0 1 0 0 0 0 1}}
|
||||
put {rrim.s30sh_1_1_30} comb region no tree {l rrim.s1sh {0.34202 0.939693 0 0 -0.939693 0.34202 0 0 0 0 1 0 0 0 0 1}}
|
||||
put {rrim.s11sh_1_1_11} comb region no tree {l rrim.s1sh {-0.173648 -0.984808 0 0 0.984808 -0.173648 0 0 0 0 1 0 0 0 0 1}}
|
||||
put {rrim.s20sh_1_1_20} comb region no tree {l rrim.s1sh {-0.984808 0.173648 0 0 -0.173648 -0.984808 0 0 0 0 1 0 0 0 0 1}}
|
||||
put {rrim.s10sh_1_1_10} comb region no tree {l rrim.s1sh {4.89659e-12 -1 0 0 1 4.89659e-12 0 0 0 0 1 0 0 0 0 1}}
|
||||
put {rrim.s1-4} comb region no tree {- {l rrii} {l rri}}
|
||||
put {rrim.s1-3} comb region no tree {u {u {u {u {u {u {l rrim.s1sh_1_1_1} {l rrim.s2sh_1_1_2}} {u {l rrim.s3sh_1_1_3} {l rrim.s4sh_1_1_4}}} {u {u {l rrim.s5sh_1_1_5} {l rrim.s6sh_1_1_6}} {u {l rrim.s7sh_1_1_7} {l rrim.s8sh_1_1_8}}}} {u {u {u {l rrim.s9sh_1_1_9} {l rrim.s10sh_1_1_10}} {u {l rrim.s11sh_1_1_11} {l rrim.s12sh_1_1_12}}} {u {u {l rrim.s13sh_1_1_13} {l rrim.s14sh_1_1_14}} {u {l rrim.s15sh_1_1_15} {l rrim.s16sh_1_1_16}}}}} {u {u {u {u {l rrim.s17sh_1_1_17} {l rrim.s18sh_1_1_18}} {u {l rrim.s19sh_1_1_19} {l rrim.s20sh_1_1_20}}} {u {u {l rrim.s21sh_1_1_21} {l rrim.s22sh_1_1_22}} {u {l rrim.s23sh_1_1_23} {l rrim.s24sh_1_1_24}}}} {u {u {u {l rrim.s25sh_1_1_25} {l rrim.s26sh_1_1_26}} {u {l rrim.s27sh_1_1_27} {l rrim.s28sh_1_1_28}}} {u {u {l rrim.s29sh_1_1_29} {l rrim.s30sh_1_1_30}} {u {l rrim.s31sh_1_1_31} {l rrim.s32sh_1_1_32}}}}}} {u {u {l rrim.s33sh_1_1_33} {l rrim.s34sh_1_1_34}} {u {l rrim.s35sh_1_1_35} {l rrim.s36sh_1_1_36}}}}
|
||||
put {rrim.s1-2} tgc V {0 0 25.19983160980545022766819} H {0 0 -13.38883160980544850815477} A {0 197.3801853527571950053243 0} B {197.3801853527571950053243 0 0} C {0 192.8812499999999943156581 0} D {192.8812499999999943156581 0 0}
|
||||
put {rrim.s1-1} tgc V {0 0 -1.453479018435659853025754} H {0 0 14.75836748475629534027576} A {0 -197.3384002078076662201056 0} B {197.3384002078076662201056 0 0} C {0 -192.3792713486825789459544 0} D {192.3792713486825789459544 0 0}
|
||||
put {rhub.s5-1} comb region no tree {u {u {u {u {u {l rhspkh_1_1_1} {l rhspkh_1_1_2}} {u {l rhspkh_1_1_3} {l rhspkh_1_1_4}}} {u {u {l rhspkh_1_1_5} {l rhspkh_1_1_6}} {u {l rhspkh_1_1_7} {l rhspkh_1_1_8}}}} {u {u {u {l rhspkh_1_1_9} {l rhspkh_1_1_10}} {u {l rhspkh_1_1_11} {l rhspkh_1_1_12}}} {u {u {l rhspkh_1_1_13} {l rhspkh_1_1_14}} {u {l rhspkh_1_1_15} {l rhspkh_1_1_16}}}}} {u {l rhspkh_1_1_17} {l rhspkh_1_1_18}}}
|
||||
put {rhub.s3-1} comb region no tree {u {u {u {u {u {l rhspkh2_1_1_1} {l rhspkh2_1_1_2}} {u {l rhspkh2_1_1_3} {l rhspkh2_1_1_4}}} {u {u {l rhspkh2_1_1_5} {l rhspkh2_1_1_6}} {u {l rhspkh2_1_1_7} {l rhspkh2_1_1_8}}}} {u {u {u {l rhspkh2_1_1_9} {l rhspkh2_1_1_10}} {u {l rhspkh2_1_1_11} {l rhspkh2_1_1_12}}} {u {u {l rhspkh2_1_1_13} {l rhspkh2_1_1_14}} {u {l rhspkh2_1_1_15} {l rhspkh2_1_1_16}}}}} {u {l rhspkh2_1_1_17} {l rhspkh2_1_1_18}}}
|
||||
put {rhub.s1-1} tgc V {0 0 -1.587500000000000133226763} H {0 0 149.2249999999999943156581} A {0 -2.540000000000000035527137 0} B {2.540000000000000035527137 0 0} C {0 -2.540000000000000035527137 0} D {2.540000000000000035527137 0 0}
|
||||
put {rrimi.s2} tgc V {0 0 1.016000000000000014210855} H {0 0 21.59000000000000341060513} A {0 -208.5339999999999633928383 0} B {208.5339999999999633928383 0 0} C {0 -208.5339999999999633928383 0} D {208.5339999999999633928383 0 0}
|
||||
put {rtire.s1} eto V {0 0 11.81099999999999994315658} N {0 0 25.39999999999999857891453} C {17.46249999999999857891453 0 0} r 222.25 r_d 15.875
|
||||
put {rrimi.s1} tgc V {0 0 2.032000000000000028421709} H {0 0 19.55799999999999982946974} A {0 -211.1374999999999602096068 0} B {211.1374999999999602096068 0 0} C {0 -211.1374999999999602096068 0} D {211.1374999999999602096068 0 0}
|
||||
put {rtire.r1} comb region yes tree {- {- {l rtire.s1 {1 0 0 0 0 1 0 0 0 0 1 61.214 0 0 0 1}} {l rrim.s1 {1 0 0 0 0 1 0 0 0 0 1 61.214 0 0 0 1}}} {l rtire.s1-1 {1 0 0 0 0 1 0 0 0 0 1 61.214 0 0 0 1}}}
|
||||
attr set {rtire.r1} {color} {33/33/33} {shader} {stack {{fbmbump {o 4 s 5 a 30}} {plastic {}}}} {region} {R} {region_id} {1002} {material_id} {1} {los} {100}
|
||||
put {spoke_d} comb region no tree {u {u {u {u {l spkj_1_1_1} {l spkj_1_1_2}} {u {l spkj_1_1_3} {l spkj_1_1_4}}} {u {u {l spkj_1_1_5} {l spkj_1_1_6}} {u {l spkj_1_1_7} {l spkj_1_1_8}}}} {l spkj_1_1_9}}
|
||||
put {spoke_c} comb region no tree {u {u {u {u {l spki_1_1_1} {l spki_1_1_2}} {u {l spki_1_1_3} {l spki_1_1_4}}} {u {u {l spki_1_1_5} {l spki_1_1_6}} {u {l spki_1_1_7} {l spki_1_1_8}}}} {l spki_1_1_9}}
|
||||
put {spoke_b} comb region no tree {u {u {u {u {l spkl_1_1_1} {l spkl_1_1_2}} {u {l spkl_1_1_3} {l spkl_1_1_4}}} {u {u {l spkl_1_1_5} {l spkl_1_1_6}} {u {l spkl_1_1_7} {l spkl_1_1_8}}}} {l spkl_1_1_9}}
|
||||
put {spoke_A} comb region no tree {u {u {u {u {l spkk_1_1_1} {l spkk_1_1_2}} {u {l spkk_1_1_3} {l spkk_1_1_4}}} {u {u {l spkk_1_1_5} {l spkk_1_1_6}} {u {l spkk_1_1_7} {l spkk_1_1_8}}}} {l spkk_1_1_9}}
|
||||
put {rhspkh2} tgc V {21.7622817260637724245953 3.83727743008382748968188 35.05199999999999249666871} H {0 0 3.809999999999999609201495} A {0.2756664820462519926991263 -1.563382307906880042125408 0} B {1.563382307906880042125408 0.2756664820462519926991263 0} C {0.2756664820462519926991263 -1.563382307906880042125408 0} D {1.563382307906880042125408 0.2756664820462519926991263 0}
|
||||
put {rrim.s1} tgc V {0 0 0} H {0 0 23.62199999999999988631316} A {0 -209.5499999999999829469743 0} B {209.5499999999999829469743 0 0} C {0 -209.5499999999999829469743 0} D {209.5499999999999829469743 0 0}
|
||||
put {rhub.s5} tgc V {0 0 91.5669999999999930651029} H {0 0 3.174999999999999822364316} A {0 -26.86049999999999826627572 0} B {26.8605000000000018189894 0 0} C {0 -26.86049999999999826627572 0} D {26.8605000000000018189894 0 0}
|
||||
put {rrim.r1} comb region yes tree {- {- {- {- {l rrim.s1 {1 0 0 0 0 1 0 0 0 0 1 61.214 0 0 0 1}} {l rrim.s1-1 {1 0 0 0 0 1 0 0 0 0 1 61.214 0 0 0 1}}} {l rrim.s1-2 {1 0 0 0 0 1 0 0 0 0 1 61.214 0 0 0 1}}} {l rrim.s1-3 {1 0 0 0 0 1 0 0 0 0 1 61.214 0 0 0 1}}} {l rrim.s1-4 {1 0 0 0 0 1 0 0 0 0 1 61.214 0 0 0 1}}}
|
||||
attr set {rrim.r1} {region} {R} {region_id} {1001} {material_id} {1} {los} {100}
|
||||
put {rhub.s4} tgc V {0 0 38.73499999999999232613845} H {0 0 52.83200000000000073896445} A {0 -15.04950000000000009947598 0} B {15.04950000000000009947598 0 0} C {0 -15.04950000000000009947598 0} D {15.04950000000000009947598 0 0}
|
||||
put {rhub.s3} tgc V {0 0 35.5599999999999951683094} H {0 0 3.174999999999999822364316} A {0 -26.86049999999999826627572 0} B {26.8605000000000018189894 0 0} C {0 -26.86049999999999826627572 0} D {26.8605000000000018189894 0 0}
|
||||
put {rhub.s2} tgc V {0 0 12.69999999999999928945726} H {0 0 22.85999999999999943156581} A {0 -6.349999999999999644728632 0} B {6.349999999999999644728632 0 0} C {0 -11.42999999999999971578291 0} D {11.42999999999999971578291 0 0}
|
||||
put {rcas.s2} tgc V {0 0 0} H {0 0 38.09999999999999431565811} A {0 -17.7799999999999975841547 0} B {17.7799999999999975841547 0 0} C {0 -17.7799999999999975841547 0} D {17.7799999999999975841547 0 0}
|
||||
put {rhub.s1} tgc V {0 0 0} H {0 0 146.0499999999999829469743} A {0 -4.889499999999999957367436 0} B {4.889499999999999957367436 0 0} C {0 -4.889499999999999957367436 0} D {4.889499999999999957367436 0 0}
|
||||
put {rhub.r1} comb region yes tree {u {u {u {u {- {l rhub.s1} {l rhub.s1-1}} {l rhub.s2}} {- {l rhub.s3} {l rhub.s3-1}}} {l rhub.s4}} {- {l rhub.s5} {l rhub.s5-1}}}
|
||||
attr set {rhub.r1} {color} {35/35/35} {shader} {plastic} {region} {R} {region_id} {1001} {material_id} {1} {los} {100}
|
||||
put {rhspkh} tgc V {22.09799999999999897681846 0 91.43999999999999772626325} H {0 0 3.809999999999999609201495} A {0 -1.587499999999999911182158 0} B {1.587499999999999911182158 0 0} C {0 -1.587499999999999911182158 0} D {1.587499999999999911182158 0 0}
|
||||
put {rwheel} comb region no tree {u {u {u {l rcassette.r {1 0 0 0 0 -1 0 0 0 0 -1 139.7 0 0 0 1}} {l rhub.r1}} {u {l rrim.r1} {l rtire.r1}}} {l spokes.r}}
|
||||
put {rri.s3} tor V {0 0 23.62199999999999988631316} H {0 0 0.9999999999999998889776975} r_a 196.8499999999999943156581 r_h 6.349999999999999644728632
|
||||
put {rri.s2} tor V {0 0 0} H {0 0 0.9999999999999998889776975} r_a 196.8499999999999943156581 r_h 6.349999999999999644728632
|
||||
put {rri.s1} tgc V {0 0 5.080000000000000071054274} H {0 0 13.97000000000000063948846} A {0 -196.8499999999999658939487 0} B {196.8499999999999943156581 0 0} C {0 -196.8499999999999658939487 0} D {196.8499999999999943156581 0 0}
|
||||
put {rrim.s9sh_1_1_9} comb region no tree {l rrim.s1sh {0.173648 -0.984808 0 0 0.984808 0.173648 0 0 0 0 1 0 0 0 0 1}}
|
||||
put {rrim.s8sh_1_1_8} comb region no tree {l rrim.s1sh {0.34202 -0.939693 0 0 0.939693 0.34202 0 0 0 0 1 0 0 0 0 1}}
|
||||
put {rrim.s7sh_1_1_7} comb region no tree {l rrim.s1sh {0.5 -0.866025 0 0 0.866025 0.5 0 0 0 0 1 0 0 0 0 1}}
|
||||
put {rrim.s6sh_1_1_6} comb region no tree {l rrim.s1sh {0.642788 -0.766044 0 0 0.766044 0.642788 0 0 0 0 1 0 0 0 0 1}}
|
||||
put {rrim.s5sh_1_1_5} comb region no tree {l rrim.s1sh {0.766044 -0.642788 0 0 0.642788 0.766044 0 0 0 0 1 0 0 0 0 1}}
|
||||
put {rrim.s4sh_1_1_4} comb region no tree {l rrim.s1sh {0.866025 -0.5 0 0 0.5 0.866025 0 0 0 0 1 0 0 0 0 1}}
|
||||
put {rrim.s3sh_1_1_3} comb region no tree {l rrim.s1sh {0.939693 -0.34202 0 0 0.34202 0.939693 0 0 0 0 1 0 0 0 0 1}}
|
||||
put {rrim.s2sh_1_1_2} comb region no tree {l rrim.s1sh {0.984808 -0.173648 0 0 0.173648 0.984808 0 0 0 0 1 0 0 0 0 1}}
|
||||
put {rrim.s1sh_1_1_1} comb region no tree {l rrim.s1sh}
|
||||
put {spkl} pipe V0 { 20.76709480285642683838887 7.551670837402355118683772 90.65737819671632280460472 } O0 1.337557689563829255163796 I0 -0 R0 1.778000000000000024868996 V1 { 20.77675991058347904072434 7.551670837402345348721155 91.2437280654907425514466 } O1 3.550397189753127680234002 I1 -0 R1 1.778000000000000024868996 V2 { 20.76548395156863691113358 7.551670837402342684185896 92.05237541198734163572226 } O2 1.778000000000000024868996 I2 -0 R2 1.778000000000000024868996 V3 { 20.76709480285642328567519 7.551670837402365776824809 97.27797698974610796085472 } O3 1.778000000000000024868996 I3 -0 R3 1.778000000000000024868996 V4 { 96.65107727050778407829057 -168.714120483398488659077 72.89613189697269035605132 } O4 1.778000000000000024868996 I4 -0 R4 1.778000000000000024868996
|
||||
put {spkk} pipe V0 { 22.11288281250000409272616 0.01288681030274606807706217 95.60269165039063921085472 } O0 1.785138282554655120293319 I0 -0 R0 6.598046874999998756550212 V1 { 22.11288281250000409272616 0.01288681030274606807706217 95.03567199707032386868377 } O1 4.070271197360822768018807 I1 -0 R1 6.598046874999998756550212 V2 { 22.11288281250001475086719 0.01288681030274606807706217 93.65678329467775142802566 } O2 1.778000000000000024868996 I2 -0 R2 6.598046874999998756550212 V3 { 22.10339501953125207478479 0.08911623464794377058595387 90.33015632036135400539933 } O3 1.778000000000000024868996 I3 -0 R3 2.496955272208652765186798 V4 { 33.55725402832030823674359 192.3227569580077442878974 73.30678124999998601651896 } O4 1.778000000000000024868996 I4 -0 R4 6.598046874999998756550212
|
||||
put {spkj} pipe V0 { 19.1582472419363760707256 10.97847094045843441278976 39.25328368547360469165142 } O0 1.074875597385660741522884 I0 -0 R0 1.778000000000000024868996 V1 { 19.15824724193638672886664 10.97847094045843441278976 38.81835383775631953540142 } O1 3.552089230759687854543927 I1 -0 R1 1.778000000000000024868996 V2 { 19.15824724193635120172985 10.97847094045843441278976 38.33187674882810114240783 } O2 1.778000000000000024868996 I2 -0 R2 1.778000000000000024868996 V3 { 19.15824724193635830715721 10.97847094045843441278976 32.88719939592282770490783 } O3 1.778000000000000024868996 I3 -0 R3 1.778000000000000024868996 V4 { 124.1515304565429431704615 -148.5849227905274005934189 73.63529357316897971941216 } O4 1.778000000000000024868996 I4 -0 R4 1.778000000000000024868996
|
||||
put {spki} pipe V0 { 21.85159059520787394603758 3.839178032743594037867751 34.56892814042966932674972 } O0 1.778000000000000024868996 I0 -0 R0 1.778000000000000024868996 V1 { 21.85159059520787749875126 3.839178032743594037867751 34.81377753618162529392066 } O1 3.311175825425637153642811 I1 -0 R1 1.778000000000000024868996 V2 { 21.85159059520787749875126 3.839178032743594037867751 35.07151374223631279392066 } O2 1.777999999999999802824391 I2 -0 R2 1.778000000000000024868996 V3 { 21.85159059520787394603758 3.848843140470644463846384 39.34188050630491062520377 } O3 1.777999999999999802824391 I3 -0 R3 1.778000000000000024868996 V4 { 0 192.9928710937499261035555 72.84086766820408342937299 } O4 1.777999999999999802824391 I4 -0 R4 1.778000000000000024868996
|
||||
put {rrii} comb region no tree {u {l rrimi.s1} {l rrimi.s2}}
|
||||
put {rri} comb region no tree {u {u {l rri.s1} {l rri.s2}} {l rri.s3}}
|
||||
@@ -1,26 +0,0 @@
|
||||
set(
|
||||
CHESS_PARTS
|
||||
bishop.asc
|
||||
chessboard.asc
|
||||
king.asc
|
||||
knight.asc
|
||||
pawn.asc
|
||||
queen.asc
|
||||
rook.asc
|
||||
)
|
||||
|
||||
foreach(piece ${CHESS_PARTS})
|
||||
g_target(${piece} "BRL-CAD Geometry Models/Sample/Chess")
|
||||
endforeach(piece ${CHESS_PARTS})
|
||||
|
||||
cmakefiles(
|
||||
${CHESS_PARTS}
|
||||
CMakeLists.txt
|
||||
)
|
||||
|
||||
# Local Variables:
|
||||
# tab-width: 8
|
||||
# mode: cmake
|
||||
# indent-tabs-mode: t
|
||||
# End:
|
||||
# ex: shiftwidth=2 tabstop=8
|
||||
@@ -1,27 +0,0 @@
|
||||
title {Bishop by Jeff Sieu. Made for Google Code-in 2017}
|
||||
units mm
|
||||
put {bottomtor.s} tor V {0 0 9} H {6.12323399573676603586882E-17 0 1} r_a 11.78466675885103676080234 r_h 3.825815710827906279689614
|
||||
put {bottometo.s} eto V {0 0 20} N {0 0 0.06032399549610674427402301} C {2.864077970686895735497046 1.71612229850775266370988 1.889299368274914403542653} r 7.634087276719064618646371 r_d 1.673109642593672896637713
|
||||
put {head_fill.s} tgc V {0 0 58.80223912679091569088996} H {0 0 22.65963591768163354345234} A {5.387125525462328923254063 0 0} B {0 5.387125525462328923254063 0} C {5.200376920059111007788033 0 0} D {0 5.200376920059111007788033 0}
|
||||
put {head_bulb.c} comb region no tree {u {u {u {l head_tip.s} {l headeto1.s}} {u {l headeto2.s} {l headeto3.s}}} {u {l headtor.s} {l head_fill.s}}}
|
||||
put {head_tip.s} ell V {0 0 87.04042899999969051805238} A {4.122892005997910835901621 0 0} B {0 4.122892005997910835901621 0} C {0 0 1.842941974166217855568561}
|
||||
put {headeto3.s} eto V {4.688718984760804335454747E-15 0 59.13440800000000763247954} N {-7.947115565380555332745523E-18 0 -0.06489312323286719474957351} C {-4.236592184243099801221888 2.53851689495714083477651 -2.794683321910145679112247} r 6.747558139033351665148075 r_d 2.154325975943817361724086
|
||||
put {headeto2.s} eto V {0 0 69.75203000000003328295861} N {1.448859083826348923311558E-17 0 0.05915416121754862865955715} C {3.216284115722051861752107 0.07864296900740583295963404 7.027901354553716117834483} r 5.71636407530149437405953 r_d 5.245951427846474501848206
|
||||
put {headeto1.s} eto V {0 0 78.93410500000000240561349} N {-6.702751448643837023482541E-18 0 -0.05473211911638976162608472} C {-4.89647969165551177894713 -1.380861880325698898275277 -7.149314636959307023289512} r 5.669699999999999739941359 r_d 2.770284953476933154092876
|
||||
put {bodytor.s} tor V {0 0 25} H {6.12323399573676603586882E-17 0 1} r_a 8.61686192136895989790446 r_h 0.9710977822416242410952236
|
||||
put {bodycut.s} tor V {0 0 44.99824699999995658572516} H {6.12323399573676603586882E-17 0 1} r_a 84.47809976324354863663757 r_h 78.38786126059979153524182
|
||||
put {headtor.s} tor V {0 0 61.97812700000005747824616} H {3.061616997868383634231992E-16 0 1} r_a 8.239894264539179502548905 r_h 0.9722303169289367996697138
|
||||
put {baseeto.s} eto V {0 0 5} N {-5.470978323999804257192075E-18 0 -0.04467392825269222295103688} C {9.315747832292275987242647 -1.365449293915910411456593 -4.391804451322707691929281} r 10.59850529883725656077331 r_d 4.265499428605880716247611
|
||||
put {headcut.s} rpc V {12.21216100000001958392204 7.476746999999903664502199 83.68170200000177771926246} H {-23.87939453125 2.601874869850522123907568E-16 1.438855652391413561129983E-15} B {-6.645126338810317127466624E-16 -8.09669190546901518246159 -9.5641987525274494430505} r 1.903339211850920698054779
|
||||
put {bishop.r} comb region yes tree {l bishop.c {1 0 0 0 0 1 0 0 0 0 1 0.960356 0 0 0 1}}
|
||||
attr set {bishop.r} {region} {R} {shader} {plastic {re 0.1 sp 0.9 di 0.1 sh 50 ex 1}} {region_id} {1000} {material_id} {1} {los} {100} {color} {255/255/217}
|
||||
put {bottom.c} comb region no tree {u {u {l bottometo.s} {l bottomtor.s}} {u {l baseeto.s} {l base_filler.s}}}
|
||||
put {bishop.c} comb region no tree {u {u {l head.c} {l body.c}} {l bottom.c}}
|
||||
put {scene.g} comb region no tree {u {l bishop.r} {l tile.r}}
|
||||
put {body.s} tgc V {0 0 5.912562917080187219198706} H {0 0 56.83007219556699851636949} A {14.1579783735264754795935 0 0} B {0 14.1579783735264754795935 0} C {14.1579783735264754795935 0 0} D {0 14.1579783735264754795935 0}
|
||||
put {tile.s} arb8 V1 {28.5 -28.5 0} V2 {28.5 28.5 0} V3 {28.5 28.5 -1} V4 {28.5 -28.5 -1} V5 {-28.5 -28.5 0} V6 {-28.5 28.5 0} V7 {-28.5 28.5 -1} V8 {-28.5 -28.5 -1}
|
||||
put {tile.r} comb region yes tree {l tile.s}
|
||||
attr set {tile.r} {oshader} {plastic {sh 1}} {region} {R} {shader} {plastic {re 0.5 sh 1}} {region_id} {1000} {material_id} {1} {los} {100} {color} {255/255/255}
|
||||
put {body.c} comb region no tree {u {- {l body.s} {l bodycut.s}} {l bodytor.s}}
|
||||
put {head.c} comb region no tree {- {l head_bulb.c} {l headcut.s}}
|
||||
put {base_filler.s} tgc V {0 0 -0.8138631382182293094729175} H {0 0 12.74035922868059600432389} A {16.38855503646686528895771 0 0} B {0 16.38855503646686528895771 0} C {9.863417071382475143082047 0 0} D {0 4.931708535691237571541023 0}
|
||||
@@ -1,83 +0,0 @@
|
||||
title {Chessboard by Jeff Sieu. Made for Google Code-in 2017}
|
||||
units mm
|
||||
put {board_cuts.c} comb region no tree {u {u {l boardcut1.s} {l boardcut2.s}} {u {l boardcut3.s} {l boardcut4.s}}}
|
||||
put {tiles_dark.r} comb region yes tree {l tiles_dark.c}
|
||||
attr set {tiles_dark.r} {oshader} {plastic} {region} {R} {shader} {plastic {re 0.1 sp 0.8 di 0.2}} {region_id} {1000} {material_id} {1} {los} {100} {color} {75/45/47}
|
||||
put {wood_plane.s} arb8 V1 {313.5 -313.5 -15} V2 {313.5 313.5 -15} V3 {313.5 313.5 5} V4 {313.5 -313.5 5} V5 {-313.5 -313.5 -15} V6 {-313.5 313.5 -15} V7 {-313.5 313.5 5} V8 {-313.5 -313.5 5}
|
||||
put {tiles_dark.c} comb region no tree {u {u {u {u {u {l a1.s} {l c1.s}} {u {l e1.s} {l g1.s}}} {u {u {l b2.s} {l d2.s}} {u {l f2.s} {l h2.s}}}} {u {u {u {l a3.s} {l c3.s}} {u {l e3.s} {l g3.s}}} {u {u {l b4.s} {l d4.s}} {u {l f4.s} {l h4.s}}}}} {u {u {u {u {l a5.s} {l c5.s}} {u {l e5.s} {l g5.s}}} {u {u {l b6.s} {l d6.s}} {u {l f6.s} {l h6.s}}}} {u {u {u {l a7.s} {l c7.s}} {u {l e7.s} {l g7.s}}} {u {u {l b8.s} {l d8.s}} {u {l f8.s} {l h8.s}}}}}}
|
||||
put {boardcut4.s} tgc V {-313.5 -313.5 5} H {-3.839267715326952574428091E-14 627 3.839267715326952574428091E-14} A {3.749399456654646756500121E-32 -6.123233995736770226692379E-16 10} B {42.75 2.617682533177467341666965E-15 0} C {3.74939945665464456697127E-32 -6.123233995736766282387853E-16 10} D {42.75 2.617682533177467341666965E-15 0}
|
||||
put {boardcut3.s} tgc V {313.5 -313.5 5} H {-627 0 3.839267715326952574428091E-14} A {6.123233995736770226692379E-16 0 10} B {0 42.75 0} C {6.123233995736766282387853E-16 0 10} D {0 42.75 0}
|
||||
put {boardcut2.s} tgc V {313.5 -313.5 5} H {-3.839267715326952574428091E-14 627 3.839267715326952574428091E-14} A {3.749399456654646756500121E-32 -6.123233995736770226692379E-16 10} B {42.75 2.617682533177467341666965E-15 0} C {3.74939945665464456697127E-32 -6.123233995736766282387853E-16 10} D {42.75 2.617682533177467341666965E-15 0}
|
||||
put {boardcut1.s} tgc V {313.5 313.5 5} H {-627 0 3.839267715326952574428091E-14} A {6.123233995736770226692379E-16 0 10} B {0 42.75 0} C {6.123233995736766282387853E-16 0 10} D {0 42.75 0}
|
||||
put {border.r} comb region yes tree {- {- {l wood_plane.s} {l tiles.c}} {l board_cuts.c}}
|
||||
attr set {border.r} {oshader} {plastic} {region} {R} {shader} {plastic {re 0.1 sp 0.8 di 0.2}} {region_id} {1002} {material_id} {1} {los} {100} {color} {245/227/174}
|
||||
put {tiles.c} comb region no tree {u {l tiles_light.r} {l tiles_dark.r}}
|
||||
put {board.g} comb region no tree {u {l tiles.c} {l border.r}}
|
||||
put {tiles_light.r} comb region yes tree {l tiles_light.c}
|
||||
attr set {tiles_light.r} {oshader} {plastic} {region} {R} {shader} {plastic {re 0.1 sp 0.8 di 0.2}} {region_id} {1001} {material_id} {1} {los} {100} {color} {255/255/255}
|
||||
put {h8.s} arb8 V1 {228 171 0} V2 {228 228 0} V3 {228 228 5} V4 {228 171 5} V5 {171 171 0} V6 {171 228 0} V7 {171 228 5} V8 {171 171 5}
|
||||
put {g8.s} arb8 V1 {171 171 0} V2 {171 228 0} V3 {171 228 5} V4 {171 171 5} V5 {114 171 0} V6 {114 228 0} V7 {114 228 5} V8 {114 171 5}
|
||||
put {f8.s} arb8 V1 {114 171 0} V2 {114 228 0} V3 {114 228 5} V4 {114 171 5} V5 {57 171 0} V6 {57 228 0} V7 {57 228 5} V8 {57 171 5}
|
||||
put {h7.s} arb8 V1 {228 114 0} V2 {228 171 0} V3 {228 171 5} V4 {228 114 5} V5 {171 114 0} V6 {171 171 0} V7 {171 171 5} V8 {171 114 5}
|
||||
put {e8.s} arb8 V1 {57 171 0} V2 {57 228 0} V3 {57 228 5} V4 {57 171 5} V5 {0 171 0} V6 {0 228 0} V7 {0 228 5} V8 {0 171 5}
|
||||
put {g7.s} arb8 V1 {171 114 0} V2 {171 171 0} V3 {171 171 5} V4 {171 114 5} V5 {114 114 0} V6 {114 171 0} V7 {114 171 5} V8 {114 114 5}
|
||||
put {d8.s} arb8 V1 {0 171 0} V2 {0 228 0} V3 {0 228 5} V4 {0 171 5} V5 {-57 171 0} V6 {-57 228 0} V7 {-57 228 5} V8 {-57 171 5}
|
||||
put {f7.s} arb8 V1 {114 114 0} V2 {114 171 0} V3 {114 171 5} V4 {114 114 5} V5 {57 114 0} V6 {57 171 0} V7 {57 171 5} V8 {57 114 5}
|
||||
put {h6.s} arb8 V1 {228 57 0} V2 {228 114 0} V3 {228 114 5} V4 {228 57 5} V5 {171 57 0} V6 {171 114 0} V7 {171 114 5} V8 {171 57 5}
|
||||
put {c8.s} arb8 V1 {-57 171 0} V2 {-57 228 0} V3 {-57 228 5} V4 {-57 171 5} V5 {-114 171 0} V6 {-114 228 0} V7 {-114 228 5} V8 {-114 171 5}
|
||||
put {e7.s} arb8 V1 {57 114 0} V2 {57 171 0} V3 {57 171 5} V4 {57 114 5} V5 {0 114 0} V6 {0 171 0} V7 {0 171 5} V8 {0 114 5}
|
||||
put {g6.s} arb8 V1 {171 57 0} V2 {171 114 0} V3 {171 114 5} V4 {171 57 5} V5 {114 57 0} V6 {114 114 0} V7 {114 114 5} V8 {114 57 5}
|
||||
put {b8.s} arb8 V1 {-114 171 0} V2 {-114 228 0} V3 {-114 228 5} V4 {-114 171 5} V5 {-171 171 0} V6 {-171 228 0} V7 {-171 228 5} V8 {-171 171 5}
|
||||
put {d7.s} arb8 V1 {0 114 0} V2 {0 171 0} V3 {0 171 5} V4 {0 114 5} V5 {-57 114 0} V6 {-57 171 0} V7 {-57 171 5} V8 {-57 114 5}
|
||||
put {f6.s} arb8 V1 {114 57 0} V2 {114 114 0} V3 {114 114 5} V4 {114 57 5} V5 {57 57 0} V6 {57 114 0} V7 {57 114 5} V8 {57 57 5}
|
||||
put {h5.s} arb8 V1 {228 0 0} V2 {228 57 0} V3 {228 57 5} V4 {228 0 5} V5 {171 0 0} V6 {171 57 0} V7 {171 57 5} V8 {171 0 5}
|
||||
put {a8.s} arb8 V1 {-171 171 0} V2 {-171 228 0} V3 {-171 228 5} V4 {-171 171 5} V5 {-228 171 0} V6 {-228 228 0} V7 {-228 228 5} V8 {-228 171 5}
|
||||
put {c7.s} arb8 V1 {-57 114 0} V2 {-57 171 0} V3 {-57 171 5} V4 {-57 114 5} V5 {-114 114 0} V6 {-114 171 0} V7 {-114 171 5} V8 {-114 114 5}
|
||||
put {e6.s} arb8 V1 {57 57 0} V2 {57 114 0} V3 {57 114 5} V4 {57 57 5} V5 {0 57 0} V6 {0 114 0} V7 {0 114 5} V8 {0 57 5}
|
||||
put {g5.s} arb8 V1 {171 0 0} V2 {171 57 0} V3 {171 57 5} V4 {171 0 5} V5 {114 0 0} V6 {114 57 0} V7 {114 57 5} V8 {114 0 5}
|
||||
put {b7.s} arb8 V1 {-114 114 0} V2 {-114 171 0} V3 {-114 171 5} V4 {-114 114 5} V5 {-171 114 0} V6 {-171 171 0} V7 {-171 171 5} V8 {-171 114 5}
|
||||
put {d6.s} arb8 V1 {0 57 0} V2 {0 114 0} V3 {0 114 5} V4 {0 57 5} V5 {-57 57 0} V6 {-57 114 0} V7 {-57 114 5} V8 {-57 57 5}
|
||||
put {f5.s} arb8 V1 {114 0 0} V2 {114 57 0} V3 {114 57 5} V4 {114 0 5} V5 {57 0 0} V6 {57 57 0} V7 {57 57 5} V8 {57 0 5}
|
||||
put {h4.s} arb8 V1 {228 -57 0} V2 {228 0 0} V3 {228 0 5} V4 {228 -57 5} V5 {171 -57 0} V6 {171 0 0} V7 {171 0 5} V8 {171 -57 5}
|
||||
put {a7.s} arb8 V1 {-171 114 0} V2 {-171 171 0} V3 {-171 171 5} V4 {-171 114 5} V5 {-228 114 0} V6 {-228 171 0} V7 {-228 171 5} V8 {-228 114 5}
|
||||
put {c6.s} arb8 V1 {-57 57 0} V2 {-57 114 0} V3 {-57 114 5} V4 {-57 57 5} V5 {-114 57 0} V6 {-114 114 0} V7 {-114 114 5} V8 {-114 57 5}
|
||||
put {e5.s} arb8 V1 {57 0 0} V2 {57 57 0} V3 {57 57 5} V4 {57 0 5} V5 {0 0 0} V6 {0 57 0} V7 {0 57 5} V8 {0 0 5}
|
||||
put {g4.s} arb8 V1 {171 -57 0} V2 {171 0 0} V3 {171 0 5} V4 {171 -57 5} V5 {114 -57 0} V6 {114 0 0} V7 {114 0 5} V8 {114 -57 5}
|
||||
put {b6.s} arb8 V1 {-114 57 0} V2 {-114 114 0} V3 {-114 114 5} V4 {-114 57 5} V5 {-171 57 0} V6 {-171 114 0} V7 {-171 114 5} V8 {-171 57 5}
|
||||
put {d5.s} arb8 V1 {0 0 0} V2 {0 57 0} V3 {0 57 5} V4 {0 0 5} V5 {-57 0 0} V6 {-57 57 0} V7 {-57 57 5} V8 {-57 0 5}
|
||||
put {f4.s} arb8 V1 {114 -57 0} V2 {114 0 0} V3 {114 0 5} V4 {114 -57 5} V5 {57 -57 0} V6 {57 0 0} V7 {57 0 5} V8 {57 -57 5}
|
||||
put {h3.s} arb8 V1 {228 -114 0} V2 {228 -57 0} V3 {228 -57 5} V4 {228 -114 5} V5 {171 -114 0} V6 {171 -57 0} V7 {171 -57 5} V8 {171 -114 5}
|
||||
put {a6.s} arb8 V1 {-171 57 0} V2 {-171 114 0} V3 {-171 114 5} V4 {-171 57 5} V5 {-228 57 0} V6 {-228 114 0} V7 {-228 114 5} V8 {-228 57 5}
|
||||
put {c5.s} arb8 V1 {-57 0 0} V2 {-57 57 0} V3 {-57 57 5} V4 {-57 0 5} V5 {-114 0 0} V6 {-114 57 0} V7 {-114 57 5} V8 {-114 0 5}
|
||||
put {e4.s} arb8 V1 {57 -57 0} V2 {57 0 0} V3 {57 0 5} V4 {57 -57 5} V5 {0 -57 0} V6 {0 0 0} V7 {0 0 5} V8 {0 -57 5}
|
||||
put {g3.s} arb8 V1 {171 -114 0} V2 {171 -57 0} V3 {171 -57 5} V4 {171 -114 5} V5 {114 -114 0} V6 {114 -57 0} V7 {114 -57 5} V8 {114 -114 5}
|
||||
put {b5.s} arb8 V1 {-114 0 0} V2 {-114 57 0} V3 {-114 57 5} V4 {-114 0 5} V5 {-171 0 0} V6 {-171 57 0} V7 {-171 57 5} V8 {-171 0 5}
|
||||
put {d4.s} arb8 V1 {0 -57 0} V2 {0 0 0} V3 {0 0 5} V4 {0 -57 5} V5 {-57 -57 0} V6 {-57 0 0} V7 {-57 0 5} V8 {-57 -57 5}
|
||||
put {f3.s} arb8 V1 {114 -114 0} V2 {114 -57 0} V3 {114 -57 5} V4 {114 -114 5} V5 {57 -114 0} V6 {57 -57 0} V7 {57 -57 5} V8 {57 -114 5}
|
||||
put {h2.s} arb8 V1 {228 -171 0} V2 {228 -114 0} V3 {228 -114 5} V4 {228 -171 5} V5 {171 -171 0} V6 {171 -114 0} V7 {171 -114 5} V8 {171 -171 5}
|
||||
put {a5.s} arb8 V1 {-171 0 0} V2 {-171 57 0} V3 {-171 57 5} V4 {-171 0 5} V5 {-228 0 0} V6 {-228 57 0} V7 {-228 57 5} V8 {-228 0 5}
|
||||
put {c4.s} arb8 V1 {-57 -57 0} V2 {-57 0 0} V3 {-57 0 5} V4 {-57 -57 5} V5 {-114 -57 0} V6 {-114 0 0} V7 {-114 0 5} V8 {-114 -57 5}
|
||||
put {e3.s} arb8 V1 {57 -114 0} V2 {57 -57 0} V3 {57 -57 5} V4 {57 -114 5} V5 {0 -114 0} V6 {0 -57 0} V7 {0 -57 5} V8 {0 -114 5}
|
||||
put {g2.s} arb8 V1 {171 -171 0} V2 {171 -114 0} V3 {171 -114 5} V4 {171 -171 5} V5 {114 -171 0} V6 {114 -114 0} V7 {114 -114 5} V8 {114 -171 5}
|
||||
put {b4.s} arb8 V1 {-114 -57 0} V2 {-114 0 0} V3 {-114 0 5} V4 {-114 -57 5} V5 {-171 -57 0} V6 {-171 0 0} V7 {-171 0 5} V8 {-171 -57 5}
|
||||
put {d3.s} arb8 V1 {0 -114 0} V2 {0 -57 0} V3 {0 -57 5} V4 {0 -114 5} V5 {-57 -114 0} V6 {-57 -57 0} V7 {-57 -57 5} V8 {-57 -114 5}
|
||||
put {f2.s} arb8 V1 {114 -171 0} V2 {114 -114 0} V3 {114 -114 5} V4 {114 -171 5} V5 {57 -171 0} V6 {57 -114 0} V7 {57 -114 5} V8 {57 -171 5}
|
||||
put {h1.s} arb8 V1 {228 -228 0} V2 {228 -171 0} V3 {228 -171 5} V4 {228 -228 5} V5 {171 -228 0} V6 {171 -171 0} V7 {171 -171 5} V8 {171 -228 5}
|
||||
put {a4.s} arb8 V1 {-171 -57 0} V2 {-171 0 0} V3 {-171 0 5} V4 {-171 -57 5} V5 {-228 -57 0} V6 {-228 0 0} V7 {-228 0 5} V8 {-228 -57 5}
|
||||
put {c3.s} arb8 V1 {-57 -114 0} V2 {-57 -57 0} V3 {-57 -57 5} V4 {-57 -114 5} V5 {-114 -114 0} V6 {-114 -57 0} V7 {-114 -57 5} V8 {-114 -114 5}
|
||||
put {e2.s} arb8 V1 {57 -171 0} V2 {57 -114 0} V3 {57 -114 5} V4 {57 -171 5} V5 {0 -171 0} V6 {0 -114 0} V7 {0 -114 5} V8 {0 -171 5}
|
||||
put {g1.s} arb8 V1 {171 -228 0} V2 {171 -171 0} V3 {171 -171 5} V4 {171 -228 5} V5 {114 -228 0} V6 {114 -171 0} V7 {114 -171 5} V8 {114 -228 5}
|
||||
put {b3.s} arb8 V1 {-114 -114 0} V2 {-114 -57 0} V3 {-114 -57 5} V4 {-114 -114 5} V5 {-171 -114 0} V6 {-171 -57 0} V7 {-171 -57 5} V8 {-171 -114 5}
|
||||
put {d2.s} arb8 V1 {0 -171 0} V2 {0 -114 0} V3 {0 -114 5} V4 {0 -171 5} V5 {-57 -171 0} V6 {-57 -114 0} V7 {-57 -114 5} V8 {-57 -171 5}
|
||||
put {f1.s} arb8 V1 {114 -228 0} V2 {114 -171 0} V3 {114 -171 5} V4 {114 -228 5} V5 {57 -228 0} V6 {57 -171 0} V7 {57 -171 5} V8 {57 -228 5}
|
||||
put {a3.s} arb8 V1 {-171 -114 0} V2 {-171 -57 0} V3 {-171 -57 5} V4 {-171 -114 5} V5 {-228 -114 0} V6 {-228 -57 0} V7 {-228 -57 5} V8 {-228 -114 5}
|
||||
put {c2.s} arb8 V1 {-57 -171 0} V2 {-57 -114 0} V3 {-57 -114 5} V4 {-57 -171 5} V5 {-114 -171 0} V6 {-114 -114 0} V7 {-114 -114 5} V8 {-114 -171 5}
|
||||
put {e1.s} arb8 V1 {57 -228 0} V2 {57 -171 0} V3 {57 -171 5} V4 {57 -228 5} V5 {0 -228 0} V6 {0 -171 0} V7 {0 -171 5} V8 {0 -228 5}
|
||||
put {b2.s} arb8 V1 {-114 -171 0} V2 {-114 -114 0} V3 {-114 -114 5} V4 {-114 -171 5} V5 {-171 -171 0} V6 {-171 -114 0} V7 {-171 -114 5} V8 {-171 -171 5}
|
||||
put {d1.s} arb8 V1 {0 -228 0} V2 {0 -171 0} V3 {0 -171 5} V4 {0 -228 5} V5 {-57 -228 0} V6 {-57 -171 0} V7 {-57 -171 5} V8 {-57 -228 5}
|
||||
put {a2.s} arb8 V1 {-171 -171 0} V2 {-171 -114 0} V3 {-171 -114 5} V4 {-171 -171 5} V5 {-228 -171 0} V6 {-228 -114 0} V7 {-228 -114 5} V8 {-228 -171 5}
|
||||
put {c1.s} arb8 V1 {-57 -228 0} V2 {-57 -171 0} V3 {-57 -171 5} V4 {-57 -228 5} V5 {-114 -228 0} V6 {-114 -171 0} V7 {-114 -171 5} V8 {-114 -228 5}
|
||||
put {b1.s} arb8 V1 {-114 -228 0} V2 {-114 -171 0} V3 {-114 -171 5} V4 {-114 -228 5} V5 {-171 -228 0} V6 {-171 -171 0} V7 {-171 -171 5} V8 {-171 -228 5}
|
||||
put {a1.s} arb8 V1 {-171 -228 0} V2 {-171 -171 0} V3 {-171 -171 5} V4 {-171 -228 5} V5 {-228 -228 0} V6 {-228 -171 0} V7 {-228 -171 5} V8 {-228 -228 5}
|
||||
put {tiles_light.c} comb region no tree {u {u {u {u {u {l b1.s} {l d1.s}} {u {l f1.s} {l h1.s}}} {u {u {l a2.s} {l c2.s}} {u {l e2.s} {l g2.s}}}} {u {u {u {l b3.s} {l d3.s}} {u {l f3.s} {l h3.s}}} {u {u {l a4.s} {l c4.s}} {u {l e4.s} {l g4.s}}}}} {u {u {u {u {l b5.s} {l d5.s}} {u {l f5.s} {l h5.s}}} {u {u {l a6.s} {l c6.s}} {u {l e6.s} {l g6.s}}}} {u {u {u {l b7.s} {l d7.s}} {u {l f7.s} {l h7.s}}} {u {u {l a8.s} {l c8.s}} {u {l e8.s} {l g8.s}}}}}}
|
||||
put {b} comb region no tree {l board.g}
|
||||
@@ -1,35 +0,0 @@
|
||||
title {King by Jeff Sieu. Made for Google Code-in 2017}
|
||||
units mm
|
||||
put {bottomtor.s} tor V {0 0 9} H {6.12323399573676603586882E-17 0 1} r_a 11.78466675885103676080234 r_h 3.825815710827906279689614
|
||||
put {bottometo.s} eto V {0 0 20} N {0 0 0.06032399549610674427402301} C {2.864077970686895735497046 1.71612229850775266370988 1.889299368274914403542653} r 8.344052226122400384156208 r_d 1.673109642593672896637713
|
||||
put {crossbase.s} arb8 V1 {-1.399999999999999911182158 -2.100000000000000088817842 98.5} V2 {-1.399999999999999911182158 2.100000000000000088817842 98.5} V3 {1.399999999999999911182158 2.100000000000000088817842 98.5} V4 {1.399999999999999911182158 -2.100000000000000088817842 98.5} V5 {-1.399999999999999911182158 -3 94} V6 {-1.399999999999999911182158 3 94} V7 {1.399999999999999911182158 3 94} V8 {1.399999999999999911182158 -3 94}
|
||||
put {crossrpp2.s} arb8 V1 {1.399999999999999911182158 -5.5 97.84354270490985072683543} V2 {1.399999999999999911182158 5.5 97.84354270490985072683543} V3 {1.399999999999999911182158 5.5 102.5708639999999007841325} V4 {1.399999999999999911182158 -5.5 102.5708639999999007841325} V5 {-1.399999999999999911182158 -5.5 97.84354270490985072683543} V6 {-1.399999999999999911182158 5.5 97.84354270490985072683543} V7 {-1.399999999999999911182158 5.5 102.5708639999999007841325} V8 {-1.399999999999999911182158 -5.5 102.5708639999999007841325}
|
||||
put {crossrpp1.s} arb8 V1 {1.399999999999999911182158 -2 93.79999999999999715782906} V2 {1.399999999999999911182158 2 93.79999999999999715782906} V3 {1.399999999999999911182158 2 104.7999999999999971578291} V4 {1.399999999999999911182158 -2 104.7999999999999971578291} V5 {-1.399999999999999911182158 -2 93.79999999999999715782906} V6 {-1.399999999999999911182158 2 93.79999999999999715782906} V7 {-1.399999999999999911182158 2 104.7999999999999971578291} V8 {-1.399999999999999911182158 -2 104.7999999999999971578291}
|
||||
put {crowncut1.s} eto V {0 0 81.72700899999993850997271} N {0 0 0.6853489141366997383642001} C {7.936978064717960634766314 0.7583105325216803471732874 14.21238543732845016620558} r 19.09763828673395735791019 r_d 8.357084880198749843316364
|
||||
put {crossrcc2.s} tgc V {0 0 90.50940899999976352319209} H {0 0 3.460360060764851031223088} A {5.74552092081112419919009 0 0} B {0 5.74552092081112419919009 0} C {5.74552092081112419919009 0 0} D {0 5.74552092081112419919009 0}
|
||||
put {crosscap1.s} arb8 V1 {1.399999999999999911182158 -2 104.7999999999999971578291} V2 {1.399999999999999911182158 2 104.7999999999999971578291} V3 {-1.399999999999999911182158 2 104.7999999999999971578291} V4 {-1.399999999999999911182158 -2 104.7999999999999971578291} V5 {1.399999999999999911182158 0 106.7999999999999971578291} V6 {1.399999999999999911182158 0 106.7999999999999971578291} V7 {-1.399999999999999911182158 0 106.7999999999999971578291} V8 {-1.399999999999999911182158 0 106.7999999999999971578291}
|
||||
put {crossrcc1.s} tgc V {0 0 92.2746839999997803261067} H {0 0 2.791740440327786565433144} A {4.517371551035873622481631 0 0} B {0 4.517371551035873622481631 0} C {4.517371551035873622481631 0 0} D {0 4.517371551035873622481631 0}
|
||||
put {crowntop.s} ell V {0 0 89.56678299999987302726367} A {14.0447366829880344596404 0 0} B {0 14.44069976610209771195059 0} C {0 0 3.638257540532901401775234}
|
||||
put {crownrcc.s} tgc V {0 0 74.52245129853007199471904} H {0 0 15.07198012589280011752635} A {14.92710113237911251360401 0 0} B {0 14.92710113237911251360401 0} C {14.92710113237911251360401 0 0} D {0 14.92710113237911251360401 0}
|
||||
put {bodytor.s} tor V {0 0 25} H {6.12323399573676603586882E-17 0 1} r_a 9.461224391138355116481762 r_h 0.9710977822416242410952236
|
||||
put {bodyjut.s} ell V {0 0 63.05140500000015180148694} A {13.30005660511547738167337 0 0} B {0 13.30005660511547738167337 0} C {0 0 3.569547284150617283415841}
|
||||
put {bodycut.s} tor V {0 0 52.17296999999997808572516} H {6.12323399573676603586882E-17 0 1} r_a 107.7000000000000028421709 r_h 101.8122462061219977158544
|
||||
put {necktor.s} tor V {0 0 75.48642500000005384208634} H {3.061616997868383634231992E-16 0 1} r_a 8.239894264539179502548905 r_h 0.9722303169289367996697138
|
||||
put {baseeto.s} eto V {0 0 5} N {-5.470978323999804257192075E-18 0 -0.04467392825269222295103688} C {9.315747832292275987242647 -1.365449293915910411456593 -4.391804451322707691929281} r 10.59850529883725656077331 r_d 4.265499428605880716247611
|
||||
put {necketo.s} eto V {4.688718984760806702037463E-15 0 73.78394899999960898639983} N {-6.414480946927261832397496E-18 0 -0.05237821183539019542774184} C {-3.419547585807252154666003 2.04895324878489937248105 -2.255716904279041923331306} r 6.983691090436433768218194 r_d 1.738855162288100331124951
|
||||
put {bottom.c} comb region no tree {u {u {l bottometo.s} {l bottomtor.s}} {u {l baseeto.s} {l base_filler.s}}}
|
||||
put {cross.c} comb region no tree {u {u {u {l crossbase.s} {l crosscap1.s}} {u {l crossrpp1.s} {l crossrpp2.s}}} {u {l crossrcc1.s} {l crossrcc2.s}}}
|
||||
put {crown.c} comb region no tree {u {- {l crownrcc.s} {l crowncut1.s}} {- {l crowntop.s} {l crownrcc.s}}}
|
||||
attr set {crown.c} {inherit} {1}
|
||||
put {scene.g} comb region no tree {u {l king.r} {l tile.r}}
|
||||
put {body.s} tgc V {0 0 5.912562917080187219198706} H {0 0 69.67849364592308347710059} A {14.1579783735264754795935 0 0} B {0 14.1579783735264754795935 0} C {14.1579783735264754795935 0 0} D {0 14.1579783735264754795935 0}
|
||||
put {tile.s} arb8 V1 {28.5 -28.5 0} V2 {28.5 28.5 0} V3 {28.5 28.5 -1} V4 {28.5 -28.5 -1} V5 {-28.5 -28.5 0} V6 {-28.5 28.5 0} V7 {-28.5 28.5 -1} V8 {-28.5 -28.5 -1}
|
||||
put {king.r} comb region yes tree {l king.c {1 0 0 0 0 1 0 0 0 0 1 0.960356 0 0 0 1}}
|
||||
attr set {king.r} {region} {R} {shader} {plastic {re 0.1 sp 0.9 di 0.1 sh 50 ex 1}} {region_id} {1000} {material_id} {1} {los} {100} {color} {255/255/217}
|
||||
put {tile.r} comb region yes tree {l tile.s}
|
||||
attr set {tile.r} {region} {R} {shader} {plastic {re 0.5 sh 1}} {region_id} {1000} {material_id} {1} {los} {100} {color} {255/255/255}
|
||||
put {body.c} comb region no tree {u {u {- {l body.s} {l bodycut.s}} {l bodytor.s}} {l bodyjut.s}}
|
||||
put {king.c} comb region no tree {u {u {u {l cross.c} {l neck.c}} {u {l crown.c} {l body.c}}} {l bottom.c}}
|
||||
put {neck.c} comb region no tree {u {u {l necketo.s} {l necktor.s}} {l neck_filler.s}}
|
||||
put {base_filler.s} tgc V {0 0 -0.8138631382182293094729175} H {0 0 12.74035922868059600432389} A {16.38855503646686528895771 0 0} B {0 16.38855503646686528895771 0} C {9.863417071382475143082047 0 0} D {0 4.931708535691237571541023 0}
|
||||
put {neck_filler.s} tgc V {0 0 72.44353981907315187527274} H {0 0 8.98374965637291111875129} A {7.656920043513968821002891 0 0} B {0 7.656920043513968821002891 0} C {7.142477262139500737703202 0 0} D {0 7.142477262139500737703202 0}
|
||||
@@ -1,37 +0,0 @@
|
||||
title {Knight by Jeff Sieu. Made for Google Code-in 2017}
|
||||
units mm
|
||||
put {nosebridge.s} tgc V {9.352709000000004380126484 -3.525789999999890511617195 80.78344850000023313896236} H {-19.14158212483127030623109 -1.101398557933205700619376E-15 -4.008762911514063843746032E-16} A {3.673940397442060361078391E-16 -5.638155724715451455608672 -2.052120859954011056203171} B {0 -1.636701665453711651565527 4.496800868217849078689596} C {3.673940397442060361078391E-16 -5.638155724715451455608672 -2.052120859954010612113962} D {0 -1.636701665453711651565527 4.496800868217849078689596}
|
||||
put {bottomtor2.s} tor V {0 0 9.596580000000059840203903} H {6.12323399573676603586882E-17 0 1} r_a 13.70450855072022378067231 r_h 3.825815710827906279689614
|
||||
put {bottomtor1.s} tor V {0 0 28.10273999999994032350514} H {6.12323399573676603586882E-17 0 1} r_a 12.58196306773280248592073 r_h 1.732851834446541783307794
|
||||
put {bodysidecutleft.s} tgc V {53.6557214677912170941454 -33.67507614822139316856919 95.69336050000360671674571} H {-20.22449106457484546695014 143.9047313715058749039599 6.169122640972837335375385E-15} A {41.33529643904953587707496 5.809297064214792527536702 -2.55302085840457415599758} B {-6.045441934467547184794967 -0.8496314556149066055112939 -99.81347984218669466827123} C {41.33529643904953587707496 5.809297064214792527536702 -2.55302085840457415599758} D {-6.045441934467546296616547 -0.8496314556149064944889915 -99.81347984218669466827123}
|
||||
put {headsidecutleft.s} tgc V {22.4313670000000300319698 -28.39713199999998138878254 66.36153450000099951466837} H {6.936023102199139422907592 58.60216329849748717606417 21.47832101088326695048636} A {20.34482858059398324712674 -2.407969144867709410107182 0} B {0.8235739520514423483987798 6.958341187070909761303028 -19.25132668795071921863382} C {20.34482858059398324712674 -2.407969144867709410107182 0} D {0.8235739520514423483987798 6.958341187070909761303028 -19.25132668795071921863382}
|
||||
put {bottometo.s} eto V {0 0 20} N {0 0 0.06032399549610674427402301} C {2.864077970686895735497046 1.71612229850775266370988 1.889299368274914403542653} r 12.40790665756528099450406 r_d 1.673109642593672896637713
|
||||
put {bodyrcc2.s} tgc V {1.17739012233862844939333E-14 11.10387200000011453937532 69.77637950000288924456981} H {0 -6.924928138629929286196329 19.02608369223165496464389} A {13.69742765710896037489874 0 0} B {0 12.87137169313410289817057 4.684796170477387278197057} C {13.69742765710896037489874 0 0} D {0 12.87137169313410289817057 4.684796170477387278197057}
|
||||
put {bodycut.s} tor V {0 0 44.16302899999998743396645} H {6.12323399573676603586882E-17 0 1} r_a 107.6761975244730109579905 r_h 97.57911721751440836669644
|
||||
put {baseeto.s} eto V {0 0 5} N {-5.470978323999804257192075E-18 0 -0.04467392825269222295103688} C {9.315747832292275987242647 -1.365449293915910411456593 -4.391804451322707691929281} r 12.99673099698723177652937 r_d 4.265499428605880716247611
|
||||
put {bodyrcc.s} tgc V {1.177390122338628764937692E-14 -5.261487999999998166344994 23.35826750000251195160672} H {0 28.82813499219855302158066 49.9317944939421209937791} A {18.70346099816892859735162 0 0} B {0 16.19767236310574887170333 -9.351730499084462522318972} C {18.70346099816892859735162 0 0} D {0 16.19767236310574887170333 -9.351730499084462522318972}
|
||||
put {headrcc.s} tgc V {2.364945229490083123615446E-14 -22.43134200000001854391485 70.83590250000071364411269} H {0 21.66504172617712953297087 7.885430312463741486794788} A {8.668888204531146612907833 0 0} B {0 2.96493438618794336036899 -8.146090276215920411573279} C {8.668888204531146612907833 0 0} D {0 2.96493438618794336036899 -8.146090276215920411573279}
|
||||
put {bodybottomsph.s} ell V {0 0 60.84612300000016915646484} A {33.54831727294207155409822 0 0} B {0 33.54831727294207155409822 0} C {0 0 33.54831727294207155409822}
|
||||
put {toptor.s} tor V {-1.290968171125081238436545E-14 26.0108720000002442418463 8.970701999999491249582206} H {1 0 0} r_a 65.14638440000000230156729 r_h 16.28659610000000057539182
|
||||
put {earcut.s} tgc V {6.942508314766508912183652E-14 -13.66162200000000304100922 85.5714520000014005063349} H {0 30.34242292565693688288775 11.04373878045554668858586} A {5 0 0} B {0 2.052120859954011500292381 -5.638155724715449679251833} C {5 0 0} D {0 2.052120859954011500292381 -5.638155724715449679251833}
|
||||
put {knight.r} comb region yes tree {l knight.c {1 0 0 0 0 1 0 0 0 0 1 0.960356 0 0 0 1}}
|
||||
attr set {knight.r} {region} {R} {shader} {plastic {re 0.1 sp 0.9 di 0.1 sh 50 ex 1}} {region_id} {1000} {material_id} {1} {los} {100} {color} {255/255/217}
|
||||
put {bottom.c} comb region no tree {u {u {u {l bottometo.s} {l bottomtor1.s}} {u {l bottomtor2.s} {l baseeto.s}}} {l base_filler.s}}
|
||||
put {bodyfrontcutright.s} tgc V {-13.74871600000018645459932 -33.1595789999997947461452 63.90854050000422859056926} H {-41.4843562340515603636959 49.43913057838897628926134 -5.652944372718708048669131E-15} A {-20.4576653316778021007849 -17.16601943455906820190648 -3.9911764866229089143701} B {4.529143121461073562272759 3.800402322767091778388249 -39.56063453447669076012971} C {-20.4576653316778021007849 -17.16601943455906820190648 -3.9911764866229089143701} D {4.529143121461073562272759 3.800402322767091778388249 -39.56063453447669076012971}
|
||||
put {eararb.s} arb8 V1 {-26.90565549999994132690517 -0.4176225000000420295442893 84.91516750000046442892199} V2 {-26.90565549999994132690517 7.334443121211129401615381 86.28206582524249768084701} V3 {26.30018901632412564595143 7.334443121211129401615381 86.28206582524249768084701} V4 {26.30018901632412564595143 -0.4176225000000420295442893 84.91516750000046442892199} V5 {-26.90565549999994132690517 2.091511985363494030565334 93.35068228383262578518043} V6 {-26.90565549999994132690517 2.091511985363494030565334 93.35068228383262578518043} V7 {26.300189016324097224242 2.091511985363494030565334 93.35068228383262578518043} V8 {26.300189016324097224242 2.091511985363494030565334 93.35068228383262578518043}
|
||||
put {knight.c} comb region no tree {u {u {l head.c} {l body.c}} {u {l base.c} {l bottom.c}}}
|
||||
put {mouth.s} arb8 V1 {-14.69511850000539787686193 -22.33384350000072160469244 67.49057449999915547778073} V2 {-14.69511850000507457991716 -22.33384350000071805197877 65.1856549462537060435352} V3 {14.5501529284419532928041 -22.33384350000074292097452 65.18565494625448764054454} V4 {14.55015292844173302455602 -22.3338435000007464736882 67.49057449999935442974675} V5 {-14.69511850000531438809048 -12.88574518707542360118623 69.9097041027158496717675} V6 {-14.69511850000531438809048 -12.88574518707542360118623 69.9097041027158496717675} V7 {14.55015292844241514558234 -12.88574518707783234106046 69.90970410271543755698076} V8 {14.55015292844241514558234 -12.88574518707783234106046 69.90970410271543755698076}
|
||||
put {bodyfrontcut.s} tgc V {-30.07391999999968135171002 -30.49249499999977786046657 57.49796150000538830227015} H {64.53820143527930497384659 5.398293464965921771651639E-15 1.446468374443825363721499E-15} A {1.653406732298293568477734E-15 -23.38457478442728287859609 13.50109054667402830318679} B {2.449293598294706907385594E-15 -20 -34.64101615137754208717524} C {1.653406732298293568477734E-15 -23.38457478442728287859609 13.50109054667402830318679} D {2.449293598294706907385594E-15 -20 -34.64101615137754208717524}
|
||||
put {scene.g} comb region no tree {u {l knight.r} {l tile.r}}
|
||||
put {tile.s} arb8 V1 {28.5 -28.5 0} V2 {28.5 28.5 0} V3 {28.5 28.5 -1} V4 {28.5 -28.5 -1} V5 {-28.5 -28.5 0} V6 {-28.5 28.5 0} V7 {-28.5 28.5 -1} V8 {-28.5 -28.5 -1}
|
||||
put {tile.r} comb region yes tree {l tile.s}
|
||||
attr set {tile.r} {region} {R} {shader} {plastic {re 0.5 sh 1}} {region_id} {1000} {material_id} {1} {los} {100} {color} {255/255/255}
|
||||
put {base.s} tgc V {0 0 5.912562917080187219198706} H {0 0 23.32946212598685420402944} A {20.43520228184366160917307 0 0} B {0 20.43520228184366160917307 0} C {20.43520228184366160917307 0 0} D {0 20.43520228184366160917307 0}
|
||||
put {body.c} comb region no tree {u {- {- {- {- {- {n {n {l bodyrcc.s} {l bodybottomsph.s}} {l bodysidesph.s}} {l bodysidecutleft.s}} {l bodysidecutright.s}} {l bodyfrontcutleft.s}} {l bodyfrontcutright.s}} {l bodyfrontcut.s}} {- {- {- {- {- {- {- {- {n {n {l bodyrcc2.s} {l bodysidesph.s}} {l toptor.s}} {l bodysidecutleft.s}} {l bodysidecutright.s}} {l bodyfrontcutleft.s}} {l bodyfrontcutright.s}} {l bodyfrontcut.s}} {l bodysidecutleft.s}} {l bodysidecutright.s}} {l bodyfrontcut.s}}}
|
||||
put {base.c} comb region no tree {u {u {u {u {l bottomtor1.s} {l bottomtor1.s}} {- {- {l base.s} {l bodycut.s}} {l bottomtor1.s}}} {l bottomtor1.s}} {l bottomtor1.s}}
|
||||
put {head.c} comb region no tree {u {u {- {- {- {- {- {n {l headrcc.s} {l toptor.s}} {l bodysidecutleft.s}} {l bodysidecutright.s}} {l headsidecutleft.s}} {l headsidecutright.s}} {l mouth.s}} {- {- {- {- {l nosebridge.s} {l bodysidecutleft.s}} {l bodysidecutright.s}} {l headsidecutleft.s}} {l headsidecutright.s}}} {- {- {- {- {- {l eararb.s} {l bodysidecutleft.s}} {l bodysidecutright.s}} {l headsidecutleft.s}} {l headsidecutright.s}} {l earcut.s}}}
|
||||
put {bodyfrontcutleft.s} tgc V {13.74871600000018645459932 -33.1595789999997947461452 63.90854050000422859056926} H {41.48435623405157457455061 49.43913057838896918383398 -5.65294437271870647094732E-15} A {20.45766533167779854807122 -17.16601943455906820190648 -3.99117648662290935845931} B {-4.529143121461062904131722 3.800402322767092222477459 -39.56063453447669076012971} C {20.45766533167779854807122 -17.16601943455906820190648 -3.99117648662290935845931} D {-4.529143121461062904131722 3.800402322767092222477459 -39.56063453447669076012971}
|
||||
put {bodysidecutright.s} tgc V {-53.6557214677912170941454 -33.67507614822139316856919 95.69336050000360671674571} H {20.22449106457484901966382 143.9047313715058749039599 6.169122640972837335375385E-15} A {-41.33529643904954298250232 5.809297064214777428503567 -2.553020858404567494659432} B {6.045441934467558731114423 -0.8496314556149066055112939 -99.81347984218669466827123} C {-41.33529643904954298250232 5.809297064214777428503567 -2.553020858404567494659432} D {6.045441934467559619292842 -0.8496314556149064944889915 -99.81347984218669466827123}
|
||||
put {headsidecutright.s} tgc V {-22.4313670000000300319698 -28.39713199999998138878254 66.36153450000099951466837} H {-6.936023102199119882982359 58.60216329849748717606417 21.47832101088326695048636} A {-20.34482858059398324712674 -2.407969144867712074642441 0} B {-0.8235739520514422373764774 6.958341187070909761303028 -19.2513266879507227713475} C {-20.34482858059398324712674 -2.407969144867712074642441 0} D {-0.8235739520514422373764774 6.958341187070909761303028 -19.2513266879507227713475}
|
||||
put {bodysidesph.s} ell V {1.591615728102624416351318E-12 -17.12677000000023497250368 59.51325500000131540900838} A {40 0 0} B {0 40 0} C {0 0 57.67733156681060791015625}
|
||||
put {base_filler.s} tgc V {0 0 -0.8138631382182293094729175} H {0 0 12.74035922868059600432389} A {16.38855503646686528895771 0 0} B {0 16.38855503646686528895771 0} C {9.863417071382475143082047 0 0} D {0 4.931708535691237571541023 0}
|
||||
@@ -1,51 +0,0 @@
|
||||
title {Pawn by Jeff Sieu. Made for Google Code-in 2017}
|
||||
units mm
|
||||
put {crowninset.s} tgc V {0 0 58} H {0 0 0.5999999999999999777955395} A {16.89118510350817103926602 0 0} B {0 16.89118510350817103926602 0} C {16.89118510350817103926602 0 0} D {0 16.89118510350817103926602 0}
|
||||
put {crowninner.s} tgc V {0 0 4} H {0 0 6} A {10.16165733953459060501245 0 0} B {0 10.16165733953459060501245 0} C {11.34243115837037585436065 0 0} D {0 11.34243115837037585436065 0}
|
||||
put {crowninsetsolid.s} tgc V {0 0 58} H {0 0 0.5999999999999999777955395} A {12.45527182860042714196425 0 0} B {0 12.45527182860042714196425 0} C {12.45527182860042714196425 0 0} D {0 12.45527182860042714196425 0}
|
||||
put {bottomtor.s} tor V {0 0 9} H {6.12323399573676603586882E-17 0 1} r_a 9.486078136436923102792207 r_h 3.825815710827906279689614
|
||||
put {bottometo.s} eto V {0 0 20} N {0 0 0.05994492135330928977987597} C {2.846080192311732925958268 1.705338238468419920224051 1.877427068825471501156699} r 5.027862554501921543703702 r_d 1.662595872768639404526425
|
||||
put {1_bodytor.s} tor V {0 0 25} H {6.12323399573676603586882E-17 0 1} r_a 10.44723380101833853927928 r_h 0.9710977822416242410952236
|
||||
put {1_bodycut.s} tor V {0 0 41} H {6.12323399573676603586882E-17 0 1} r_a 86.63076947877770805916953 r_h 78.38786126059979153524182
|
||||
put {1_bodyeto.s} eto V {-0.2528320000000000011830537 0 53} N {0 0 0.03930267507158188844407221} C {11.02968444236560330296015 0 11.02968444236560330296015} r 16.28367943394245997978942 r_d 4.327199580192768735287245
|
||||
put {1_baseeto.s} eto V {0 0 5} N {-5.470978323999804257192075E-18 0 -0.04467392825269222295103688} C {9.315747832292275987242647 -1.365449293915910411456593 -4.391804451322707691929281} r 10.59850529883725656077331 r_d 4.265499428605880716247611
|
||||
put {1_bodytop.c} comb region no tree {- {l bodytop.s} {l 1_bodyeto.s}}
|
||||
put {crowncut3.s} arb8 V1 {-13.99038105676657828269072 5.767949192431094829203175 4} V2 {11.9903810567665729536202 -9.232050807568883854514752 4.000000000000001776356839} V3 {11.9903810567665729536202 -9.232050807568883854514752 10.00000000000000355271368} V4 {-13.99038105676657828269072 5.767949192431094829203175 10} V5 {-11.99038105676654808462445 9.232050807568848327377964 4} V6 {13.99038105676657472997704 -5.767949192431118810020507 4.000000000000001776356839} V7 {13.99038105676657472997704 -5.767949192431118810020507 10.00000000000000355271368} V8 {-11.99038105676654808462445 9.232050807568848327377964 10}
|
||||
put {crowncut2.s} arb8 V1 {-11.99038105676656940090652 -9.232050807568908723510503 3.999999999999998223643161} V2 {13.99038105676658183540439 5.767949192431108151879471 3.99999999999999866773237} V3 {13.99038105676658538811807 5.767949192431077065634781 10.00000000000000355271368} V4 {-11.99038105676654453191077 -9.232050807568926487078897 10} V5 {-13.99038105676658716447491 -5.767949192431157889870974 3.99999999999999866773237} V6 {11.99038105676657472997704 9.232050807568862538232679 3.99999999999999911182158} V7 {11.990381056766564071836 9.232050807568855432805321 10.00000000000000355271368} V8 {-13.99038105676657472997704 -5.767949192431152560800456 10}
|
||||
put {crowncut1.s} arb8 V1 {1.999999999999999777955395 -14.99999999999999822364316 4} V2 {1.999999999999999777955395 14.99999999999999822364316 4} V3 {1.999999999999999777955395 14.99999999999999822364316 10} V4 {1.999999999999999777955395 -14.99999999999999822364316 10} V5 {-1.999999999999999777955395 -14.99999999999999822364316 4} V6 {-1.999999999999999777955395 14.99999999999999822364316 4} V7 {-1.999999999999999777955395 14.99999999999999822364316 10} V8 {-1.999999999999999777955395 -14.99999999999999822364316 10}
|
||||
put {crownrcc.s} tgc V {0 0 -2.292185375575158445826673} H {0 0 12.29218537557515844582667} A {14.16165733953459238136929 0 0} B {0 14.16165733953459238136929 0} C {14.16165733953459238136929 0 0} D {0 14.16165733953459238136929 0}
|
||||
put {1_bottom.c} comb region no tree {u {u {l 1_bottometo.s} {l 1_bottomtor.s}} {u {l 1_baseeto.s} {l 1_base_filler.s}}}
|
||||
put {bodyjut.s} tgc V {0 0 42} H {0 0 2.264716425774114583191476} A {14.1579783735264754795935 0 0} B {0 14.1579783735264754795935 0} C {14.1579783735264754795935 0 0} D {0 14.1579783735264754795935 0}
|
||||
put {bodytor.s} tor V {0 0 25.00000000000000355271368} H {6.12323399573676603586882E-17 0 1} r_a 6.146768722816724483948292 r_h 0.8241116028491989320414746
|
||||
put {bodytop.s} tgc V {0 0 45.57436401080622090375982} H {0 0 10.23282399021384136972301} A {14.1579783735264754795935 0 0} B {0 14.1579783735264754795935 0} C {14.1579783735264754795935 0 0} D {0 14.1579783735264754795935 0}
|
||||
put {bodycut.s} tor V {0 0 37.96582364986083035773845} H {6.12323399573676603586882E-17 0 1} r_a 67.81451175298326461415854 r_h 63.43019393270687800168162
|
||||
put {bodyeto.s} eto V {-0.2528320000000000011830537 0 53} N {0 0 0.03930267507158188844407221} C {11.02968444236560330296015 0 11.02968444236560330296015} r 16.28367943394245997978942 r_d 4.327199580192768735287245
|
||||
put {baseeto.s} eto V {0 0 4.281399000000007504240784} N {-4.792704526346514451144025E-18 0 -0.03913540238445389202182056} C {8.160812227361974535710942 -1.196165406603733272206114 -3.847323061096424634541791} r 9.284537665853610732824563 r_d 3.736676917349199378293179
|
||||
put {necketo.s} eto V {0 0 40.72638399999996039468897} N {-3.291837815534646033062117E-18 0 -0.02687989563869803977258499} C {4.168219486530275297297976 -0.6109538876782616423355421 -1.965060156692675530365477} r 5.706605353654313539379928 r_d 2.566512146398107763189955
|
||||
put {bodytop.c} comb region no tree {u {l head.s} {l necketo.s}}
|
||||
put {1_scene.g} comb region no tree {u {l rook.r {1 0 0 -58 0 1 0 0 0 0 1 0 0 0 0 1}} {l 1_tile.r {1 0 0 -58 0 1 0 0 0 0 1 0 0 0 0 1}}}
|
||||
put {1_base_filler.s} tgc V {0 0 -0.8138631382182293094729175} H {0 0 12.74035922868059600432389} A {16.38855503646686528895771 0 0} B {0 16.38855503646686528895771 0} C {9.863417071382475143082047 0 0} D {0 4.931708535691237571541023 0}
|
||||
put {bottom.c} comb region no tree {u {u {l bottometo.s} {l bottomtor.s}} {u {l baseeto.s} {l base_filler.s}}}
|
||||
put {1_body.s} tgc V {0 0 5.912562917080187219198706} H {0 0 49.90908570176724623479458} A {14.1579783735264754795935 0 0} B {0 14.1579783735264754795935 0} C {14.1579783735264754795935 0 0} D {0 14.1579783735264754795935 0}
|
||||
put {1_tile.s} arb8 V1 {28.5 -28.5 0} V2 {28.5 28.5 0} V3 {28.5 28.5 -1} V4 {28.5 -28.5 -1} V5 {-28.5 -28.5 0} V6 {-28.5 28.5 0} V7 {-28.5 28.5 -1} V8 {-28.5 -28.5 -1}
|
||||
put {1_tile.r} comb region yes tree {l 1_tile.s}
|
||||
attr set {1_tile.r} {region} {R} {color} {255/255/255} {los} {100} {material_id} {1} {region_id} {1000} {shader} {plastic {re 0.5 sh 1}}
|
||||
put {1_body.c} comb region no tree {u {u {- {l 1_body.s} {l 1_bodycut.s}} {l 1_bodytor.s}} {l bodyjut.s}}
|
||||
put {crown.c} comb region no tree {u {- {- {- {- {- {l crownrcc.s {1 0 0 0 0 1 0 0 0 0 1 58 0 0 0 1}} {l crowninner.s {1 0 0 0 0 1 0 0 0 0 1 58 0 0 0 1}}} {l crowncut1.s {1 0 0 0 0 1 0 0 0 0 1 58 0 0 0 1}}} {l crowncut2.s {1 0 0 0 0 1 0 0 0 0 1 58 0 0 0 1}}} {l crowncut3.s {1 0 0 0 0 1 0 0 0 0 1 58 0 0 0 1}}} {l crowninset.s}} {l crowninsetsolid.s}}
|
||||
put {scene.g} comb region no tree {u {l pawn.r} {l tile.r}}
|
||||
put {body.s} tgc V {0 0 -0.6898679999999998146975599} H {0 0 42.85638383046779154028627} A {14.1579783735264754795935 0 0} B {0 14.1579783735264754795935 0} C {14.1579783735264754795935 0 0} D {0 14.1579783735264754795935 0}
|
||||
put {pawn.r} comb region yes tree {l pawn.c {1 0 0 0 0 1 0 0 0 0 1 0.991685000000004 0 0 0 1}}
|
||||
attr set {pawn.r} {region} {R} {shader} {plastic {re 0.1 sp 0.9 di 0.1 sh 50 ex 1}} {region_id} {1000} {material_id} {1} {los} {100} {color} {255/255/217}
|
||||
put {rook.r} comb region yes tree {l rook.c {1 0 0 0 0 1 0 0 0 0 1 1.090422 0 0 0 1}}
|
||||
attr set {rook.r} {region} {R} {color} {255/255/217} {los} {100} {material_id} {1} {region_id} {1000} {shader} {plastic {re 0.1 sp 0.9 di 0.1 sh 50 ex 1}}
|
||||
put {tile.s} arb8 V1 {28.5 -28.5 0} V2 {28.5 28.5 0} V3 {28.5 28.5 -1} V4 {28.5 -28.5 -1} V5 {-28.5 -28.5 0} V6 {-28.5 28.5 0} V7 {-28.5 28.5 -1} V8 {-28.5 -28.5 -1}
|
||||
put {tile.r} comb region yes tree {l tile.s}
|
||||
attr set {tile.r} {oshader} {plastic {sh 1}} {region} {R} {shader} {plastic {re 0.5 sh 1}} {region_id} {1000} {material_id} {1} {los} {100} {color} {255/255/255}
|
||||
put {body.c} comb region no tree {u {- {l body.s} {l bodycut.s}} {l bodytor.s}}
|
||||
put {pawn.c} comb region no tree {u {u {l top.c} {l body.c}} {u {l bottom.c} {l bodytop.c}}}
|
||||
put {rook.c} comb region no tree {u {u {l crown.c} {l 1_body.c}} {u {l 1_bottom.c} {l 1_bodytop.c}}}
|
||||
put {head.s} ell V {0 0 52.26777799999997853319655} A {10.18854239405582262634198 0 0} B {0 10.18854239405582262634198 0} C {0 0 10.18854239405582262634198}
|
||||
put {top.c} comb region no tree {u {l head.s} {l necketo.s}}
|
||||
put {1_bottomtor.s} tor V {0 0 9} H {6.12323399573676603586882E-17 0 1} r_a 11.78466675885103676080234 r_h 3.825815710827906279689614
|
||||
put {1_bottometo.s} eto V {0 0 20} N {0 0 0.07140720069529053748436098} C {3.390289200472452524337541 2.031421963671408370544214 2.236416504815224470803514} r 9.036682630367613100474955 r_d 1.980506679827312765951319
|
||||
put {base_filler.s} tgc V {0 0 -0.8138631382182293094729175} H {0 0 12.74035922868059600432389} A {14.57675099872487578522851 0 0} B {0 14.57675099872487578522851 0} C {9.863417071382475143082047 0 0} D {0 4.931708535691237571541023 0}
|
||||
@@ -1,44 +0,0 @@
|
||||
title {Queen by Jeff Sieu. Made for Google Code-in 2017}
|
||||
units mm
|
||||
put {crown_fill.s} tgc V {0 0 85.4996148325125346900677} H {0 0 3.961725628291488110477303} A {13.92497241322581302824801 0 0} B {0 13.92497241322581302824801 0} C {10.3643310870127276501762 0 0} D {0 10.3643310870127276501762 0}
|
||||
put {crown_main.c} comb region no tree {u {u {- {- {l crownrcc.s} {l crowncut1.s}} {l crowncut2.s}} {- {- {l crown_fill.s} {l crowncut2.s}} {l crownrcc.s}}} {- {- {- {l crowneto1.s} {l crownrcc.s}} {l crowncut2.s}} {l crown_fill.s}}}
|
||||
put {bottomtor.s} tor V {0 0 9} H {6.12323399573676603586882E-17 0 1} r_a 11.78466675885103676080234 r_h 3.825815710827906279689614
|
||||
put {bottometo.s} eto V {0 0 20} N {0 0 0.06032399549610674427402301} C {2.864077970686895735497046 1.71612229850775266370988 1.889299368274914403542653} r 7.93389995193779462567818 r_d 1.673109642593672896637713
|
||||
put {head_fill.s} tgc V {0 0 67.65223912679090290112072} H {0 0 22.65963591768163354345234} A {5.387125525462328923254063 0 0} B {0 5.387125525462328923254063 0} C {5.200376920059111007788033 0 0} D {0 5.200376920059111007788033 0}
|
||||
put {crowncut2.s} tgc V {0 0 86.89911600000084490602603} H {0 0 6.858375356511876574927555} A {9.438877285833902064382528 0 0} B {0 9.438877285833902064382528 0} C {15.49844917074207906182437 0 0} D {0 15.49844917074207906182437 0}
|
||||
put {crowncut1.s} eto V {0 0 77.72700899999993850997271} N {0 0 0.6853489141366997383642001} C {7.936978064717960634766314 0.7583105325216803471732874 14.21238543732845016620558} r 19.09763828673395735791019 r_d 8.357084880198749843316364
|
||||
put {crowneto1.s} eto V {1.577721810442023610823457E-30 0 87.39109400000032223942981} N {-1.573547818886363209483057E-17 0 -0.04282997677321952190165888} C {-1.665828485074095866025345 -1.27132480626570165682665 -1.898428097677101966667124} r 12.13000000000000078159701 r_d 1.123246664863733368378007
|
||||
put {crownell8.s} ell V {-13.73660800000212844906855 2.220446049250313080847263E-14 87.68836799997369269021874} A {0 -2.442952198710223399302777 1.005777905178345307186806E-16} B {3.658968546871206317661063 0 3.323573023963026340510396} C {-0.7091037075487675034324297 0 0.7806623003868651267112}
|
||||
put {crownell7.s} ell V {-9.713248667302867289663482 9.713248667302899264086591 87.68836799997369269021874} A {-1.727428065822585123711974 -1.727428065822585123711974 1.005777905178345307186806E-16} B {2.587281471640917818177741 -2.587281471640917818177741 3.323573023963026340510396} C {-0.5014120401722559350332631 0.5014120401722559350332631 0.7806623003868651267112}
|
||||
put {crownell6.s} ell V {2.220446049250313080847263E-14 13.73660800000212844906855 87.68836799997369269021874} A {-2.442952198710223399302777 0 1.005777905178345307186806E-16} B {0 -3.658968546871206317661063 3.323573023963026340510396} C {0 0.7091037075487675034324297 0.7806623003868651267112}
|
||||
put {crownell5.s} ell V {9.713248667302899264086591 9.713248667302867289663482 87.68836799997369269021874} A {-1.727428065822585123711974 1.727428065822585123711974 1.005777905178345307186806E-16} B {-2.587281471640917818177741 -2.587281471640917818177741 3.323573023963026340510396} C {0.5014120401722559350332631 0.5014120401722559350332631 0.7806623003868651267112}
|
||||
put {crownell4.s} ell V {13.73660800000212844906855 -2.220446049250313080847263E-14 87.68836799997369269021874} A {0 2.442952198710223399302777 1.005777905178345307186806E-16} B {-3.658968546871206317661063 0 3.323573023963026340510396} C {0.7091037075487675034324297 0 0.7806623003868651267112}
|
||||
put {crownell3.s} ell V {9.713248667302867289663482 -9.713248667302899264086591 87.68836799997369269021874} A {1.727428065822584901667369 1.727428065822584901667369 1.005777905178345307186806E-16} B {-2.587281471640917818177741 2.587281471640917818177741 3.323573023963026340510396} C {0.5014120401722559350332631 -0.5014120401722559350332631 0.7806623003868651267112}
|
||||
put {crownell2.s} ell V {-2.220446049250313080847263E-14 -13.73660800000212844906855 87.68836799997369269021874} A {2.442952198710222955213567 0 1.005777905178345307186806E-16} B {0 3.658968546871206317661063 3.323573023963026340510396} C {0 -0.7091037075487675034324297 0.7806623003868651267112}
|
||||
put {crownell1.s} ell V {-9.713248667302899264086591 -9.713248667302867289663482 87.68836799997369269021874} A {1.727428065822584679622764 -1.727428065822584679622764 1.005777905178345307186806E-16} B {2.587281471640917818177741 2.587281471640917818177741 3.323573023963026340510396} C {-0.5014120401722559350332631 -0.5014120401722559350332631 0.7806623003868651267112}
|
||||
put {crownrcc.s} tgc V {0 0 70.52245129853007199471904} H {0 0 15.07198012589280011752635} A {14.92710113237911251360401 0 0} B {0 14.92710113237911251360401 0} C {14.92710113237911251360401 0 0} D {0 14.92710113237911251360401 0}
|
||||
put {head_tip.s} ell V {0 0 94.91151499999973850663082} A {3.119016812725599496758377 0 0} B {0 3.119016812725599496758377 0} C {0 0 1.345488882629591875783603}
|
||||
put {crownell.c} comb region no tree {u {u {u {l crownell1.s} {l crownell2.s}} {u {l crownell3.s} {l crownell4.s}}} {u {u {l crownell5.s} {l crownell6.s}} {u {l crownell7.s} {l crownell8.s}}}}
|
||||
put {headeto1.s} eto V {0 0 89.57779000000000735326466} N {-5.519803738384860362821316E-18 0 -0.04507261801711288928817822} C {-4.376792271273803436315575 -1.09418866449798435347418 -4.1289869793813673837235} r 4.82069915201276888438997 r_d 2.281365997196153738713065
|
||||
put {bodytor.s} tor V {0 0 25} H {6.12323399573676603586882E-17 0 1} r_a 9.140689709069368618088447 r_h 0.9710977822416242410952236
|
||||
put {bodyjut.s} ell V {0 0 57.95812100000001976241037} A {13.30005660511547738167337 0 0} B {0 13.30005660511547738167337 0} C {0 0 3.569547284150617283415841}
|
||||
put {bodycut.s} tor V {0 0 46.43319499999997646000338} H {6.12323399573676603586882E-17 0 1} r_a 84.47809976324354863663757 r_h 78.38786126059979153524182
|
||||
put {necktor.s} tor V {0 0 70.41021300000004146113497} H {3.061616997868383634231992E-16 0 1} r_a 8.239894264539179502548905 r_h 0.9722303169289367996697138
|
||||
put {baseeto.s} eto V {0 0 5} N {-5.470978323999804257192075E-18 0 -0.04467392825269222295103688} C {9.315747832292275987242647 -1.365449293915910411456593 -4.391804451322707691929281} r 10.59850529883725656077331 r_d 4.265499428605880716247611
|
||||
put {necketo.s} eto V {4.688718984760804335454747E-15 0 67.98440800000000194813765} N {-7.947115565380555332745523E-18 0 -0.06489312323286719474957351} C {-4.236592184243099801221888 2.53851689495714083477651 -2.794683321910145679112247} r 6.747558139033351665148075 r_d 2.154325975943817361724086
|
||||
put {bottom.c} comb region no tree {u {u {l bottometo.s} {l bottomtor.s}} {u {l baseeto.s} {l base_filler.s}}}
|
||||
put {queen.r} comb region yes tree {l queen.c {1 0 0 0 0 1 0 0 0 0 1 0.960356 0 0 0 1}}
|
||||
attr set {queen.r} {region} {R} {shader} {plastic {re 0.1 sp 0.9 di 0.1 sh 50 ex 1}} {region_id} {1000} {material_id} {1} {los} {100} {color} {255/255/217}
|
||||
put {crown.c} comb region no tree {- {l crown_main.c} {l crownell.c}}
|
||||
attr set {crown.c} {inherit} {1}
|
||||
put {queen.c} comb region no tree {u {u {u {l head.c} {l neck.c}} {u {l crown.c} {l body.c}}} {l bottom.c}}
|
||||
put {scene.g} comb region no tree {u {l queen.r} {l tile.r}}
|
||||
put {body.s} tgc V {0 0 5.912562917080187219198706} H {0 0 59.45235824170033822611003} A {14.1579783735264754795935 0 0} B {0 14.1579783735264754795935 0} C {14.1579783735264754795935 0 0} D {0 14.1579783735264754795935 0}
|
||||
put {tile.s} arb8 V1 {28.5 -28.5 0} V2 {28.5 28.5 0} V3 {28.5 28.5 -1} V4 {28.5 -28.5 -1} V5 {-28.5 -28.5 0} V6 {-28.5 28.5 0} V7 {-28.5 28.5 -1} V8 {-28.5 -28.5 -1}
|
||||
put {tile.r} comb region yes tree {l tile.s}
|
||||
attr set {tile.r} {region} {R} {shader} {plastic {re 0.5 sh 1}} {region_id} {1000} {material_id} {1} {los} {100} {color} {255/255/255}
|
||||
put {body.c} comb region no tree {u {u {- {l body.s} {l bodycut.s}} {l bodytor.s}} {l bodyjut.s}}
|
||||
put {neck.c} comb region no tree {u {u {l necketo.s} {l necktor.s}} {l neck_filler.s}}
|
||||
put {head.c} comb region no tree {u {u {l head_tip.s} {l headeto1.s}} {l head_fill.s}}
|
||||
put {base_filler.s} tgc V {0 0 -0.8138631382182293094729175} H {0 0 12.74035922868059600432389} A {16.38855503646686528895771 0 0} B {0 16.38855503646686528895771 0} C {9.863417071382475143082047 0 0} D {0 4.931708535691237571541023 0}
|
||||
put {neck_filler.s} tgc V {5.044847376139677212870351E-16 0.11939600000000516466514 64.39600271525775099235034} H {0 0 13.56002315446382588959295} A {7.491481711620123995487575 0 0} B {0 7.491481711620123995487575 0} C {7.491481711620123995487575 0 0} D {0 7.491481711620123995487575 0}
|
||||
@@ -1,30 +0,0 @@
|
||||
title {Rook by Jeff Sieu. Made for Google Code-in 2017}
|
||||
units mm
|
||||
put {crowninset.s} tgc V {0 0 58} H {0 0 0.5999999999999999777955395} A {16.89118510350817103926602 0 0} B {0 16.89118510350817103926602 0} C {16.89118510350817103926602 0 0} D {0 16.89118510350817103926602 0}
|
||||
put {crowninner.s} tgc V {0 0 4} H {0 0 6} A {10.16165733953459060501245 0 0} B {0 10.16165733953459060501245 0} C {11.34243115837037585436065 0 0} D {0 11.34243115837037585436065 0}
|
||||
put {crowninsetsolid.s} tgc V {0 0 58} H {0 0 0.5999999999999999777955395} A {12.45527182860042714196425 0 0} B {0 12.45527182860042714196425 0} C {12.45527182860042714196425 0 0} D {0 12.45527182860042714196425 0}
|
||||
put {bottomtor.s} tor V {0 0 9} H {6.12323399573676603586882E-17 0 1} r_a 11.78466675885103676080234 r_h 3.825815710827906279689614
|
||||
put {bottometo.s} eto V {0 0 20} N {0 0 0.07140720069529053748436098} C {3.390289200472452524337541 2.031421963671408370544214 2.236416504815224470803514} r 9.036682630367613100474955 r_d 1.980506679827312765951319
|
||||
put {crowncut3.s} arb8 V1 {-13.99038105676657828269072 5.767949192431094829203175 4} V2 {11.9903810567665729536202 -9.232050807568883854514752 4.000000000000001776356839} V3 {11.9903810567665729536202 -9.232050807568883854514752 10.00000000000000355271368} V4 {-13.99038105676657828269072 5.767949192431094829203175 10} V5 {-11.99038105676654808462445 9.232050807568848327377964 4} V6 {13.99038105676657472997704 -5.767949192431118810020507 4.000000000000001776356839} V7 {13.99038105676657472997704 -5.767949192431118810020507 10.00000000000000355271368} V8 {-11.99038105676654808462445 9.232050807568848327377964 10}
|
||||
put {crowncut2.s} arb8 V1 {-11.99038105676656940090652 -9.232050807568908723510503 3.999999999999998223643161} V2 {13.99038105676658183540439 5.767949192431108151879471 3.99999999999999866773237} V3 {13.99038105676658538811807 5.767949192431077065634781 10.00000000000000355271368} V4 {-11.99038105676654453191077 -9.232050807568926487078897 10} V5 {-13.99038105676658716447491 -5.767949192431157889870974 3.99999999999999866773237} V6 {11.99038105676657472997704 9.232050807568862538232679 3.99999999999999911182158} V7 {11.990381056766564071836 9.232050807568855432805321 10.00000000000000355271368} V8 {-13.99038105676657472997704 -5.767949192431152560800456 10}
|
||||
put {crowncut1.s} arb8 V1 {1.999999999999999777955395 -14.99999999999999822364316 4} V2 {1.999999999999999777955395 14.99999999999999822364316 4} V3 {1.999999999999999777955395 14.99999999999999822364316 10} V4 {1.999999999999999777955395 -14.99999999999999822364316 10} V5 {-1.999999999999999777955395 -14.99999999999999822364316 4} V6 {-1.999999999999999777955395 14.99999999999999822364316 4} V7 {-1.999999999999999777955395 14.99999999999999822364316 10} V8 {-1.999999999999999777955395 -14.99999999999999822364316 10}
|
||||
put {crownrcc.s} tgc V {0 0 -2.292185375575158445826673} H {0 0 12.29218537557515844582667} A {14.16165733953459238136929 0 0} B {0 14.16165733953459238136929 0} C {14.16165733953459238136929 0 0} D {0 14.16165733953459238136929 0}
|
||||
put {bodyjut.s} tgc V {0 0 42} H {0 0 2.264716425774114583191476} A {14.1579783735264754795935 0 0} B {0 14.1579783735264754795935 0} C {14.1579783735264754795935 0 0} D {0 14.1579783735264754795935 0}
|
||||
put {bodytor.s} tor V {0 0 25} H {6.12323399573676603586882E-17 0 1} r_a 10.44723380101833853927928 r_h 0.9710977822416242410952236
|
||||
put {bodytop.s} tgc V {0 0 45.57436401080622090375982} H {0 0 10.23282399021384136972301} A {14.1579783735264754795935 0 0} B {0 14.1579783735264754795935 0} C {14.1579783735264754795935 0 0} D {0 14.1579783735264754795935 0}
|
||||
put {bodycut.s} tor V {0 0 41} H {6.12323399573676603586882E-17 0 1} r_a 86.63076947877770805916953 r_h 78.38786126059979153524182
|
||||
put {bodyeto.s} eto V {-0.2528320000000000011830537 0 53} N {0 0 0.03930267507158188844407221} C {11.02968444236560330296015 0 11.02968444236560330296015} r 16.28367943394245997978942 r_d 4.327199580192768735287245
|
||||
put {baseeto.s} eto V {0 0 5} N {-5.470978323999804257192075E-18 0 -0.04467392825269222295103688} C {9.315747832292275987242647 -1.365449293915910411456593 -4.391804451322707691929281} r 10.59850529883725656077331 r_d 4.265499428605880716247611
|
||||
put {bodytop.c} comb region no tree {- {l bodytop.s} {l bodyeto.s}}
|
||||
put {bottom.c} comb region no tree {u {u {l bottometo.s} {l bottomtor.s}} {u {l baseeto.s} {l base_filler.s}}}
|
||||
put {crown.c} comb region no tree {u {- {- {- {- {- {l crownrcc.s {1 0 0 0 0 1 0 0 0 0 1 58 0 0 0 1}} {l crowninner.s {1 0 0 0 0 1 0 0 0 0 1 58 0 0 0 1}}} {l crowncut1.s {1 0 0 0 0 1 0 0 0 0 1 58 0 0 0 1}}} {l crowncut2.s {1 0 0 0 0 1 0 0 0 0 1 58 0 0 0 1}}} {l crowncut3.s {1 0 0 0 0 1 0 0 0 0 1 58 0 0 0 1}}} {l crowninset.s}} {l crowninsetsolid.s}}
|
||||
put {scene.g} comb region no tree {u {l rook.r} {l tile.r}}
|
||||
put {body.s} tgc V {0 0 5.912562917080187219198706} H {0 0 49.90908570176724623479458} A {14.1579783735264754795935 0 0} B {0 14.1579783735264754795935 0} C {14.1579783735264754795935 0 0} D {0 14.1579783735264754795935 0}
|
||||
put {rook.r} comb region yes tree {l rook.c {1 0 0 0 0 1 0 0 0 0 1 1.090422 0 0 0 1}}
|
||||
attr set {rook.r} {region} {R} {shader} {plastic {re 0.1 sp 0.9 di 0.1 sh 50 ex 1}} {region_id} {1000} {material_id} {1} {los} {100} {color} {255/255/217}
|
||||
put {tile.s} arb8 V1 {28.5 -28.5 0} V2 {28.5 28.5 0} V3 {28.5 28.5 -1} V4 {28.5 -28.5 -1} V5 {-28.5 -28.5 0} V6 {-28.5 28.5 0} V7 {-28.5 28.5 -1} V8 {-28.5 -28.5 -1}
|
||||
put {tile.r} comb region yes tree {l tile.s}
|
||||
attr set {tile.r} {oshader} {plastic {sh 1}} {region} {R} {shader} {plastic {re 0.5 sh 1}} {region_id} {1000} {material_id} {1} {los} {100} {color} {255/255/255}
|
||||
put {body.c} comb region no tree {u {u {- {l body.s} {l bodycut.s}} {l bodytor.s}} {l bodyjut.s}}
|
||||
put {rook.c} comb region no tree {u {u {l crown.c} {l body.c}} {u {l bottom.c} {l bodytop.c}}}
|
||||
put {base_filler.s} tgc V {0 0 -0.8138631382182293094729175} H {0 0 12.74035922868059600432389} A {16.38855503646686528895771 0 0} B {0 16.38855503646686528895771 0} C {9.863417071382475143082047 0 0} D {0 4.931708535691237571541023 0}
|
||||
File diff suppressed because it is too large
Load Diff
Binary file not shown.
@@ -1,19 +0,0 @@
|
||||
set(COMGEOM_V5_MODELS ADA073408.comgeom)
|
||||
|
||||
foreach(comgeom_input ${COMGEOM_V5_MODELS})
|
||||
g_target(${comgeom_input} "BRL-CAD Geometry Models/Sample")
|
||||
endforeach(comgeom_input ${COMGEOM_V5_MODELS})
|
||||
|
||||
cmakefiles(
|
||||
${COMGEOM_V5_MODELS}
|
||||
CMakeLists.txt
|
||||
README_ADA073408
|
||||
ADA073408_inputs.tar.gz
|
||||
)
|
||||
|
||||
# Local Variables:
|
||||
# tab-width: 8
|
||||
# mode: cmake
|
||||
# indent-tabs-mode: t
|
||||
# End:
|
||||
# ex: shiftwidth=2 tabstop=8
|
||||
@@ -1,17 +0,0 @@
|
||||
Model ADA073408.comgeom is a transcription of the model documented in
|
||||
the 1979 public release report:
|
||||
|
||||
A Combinatorial Geometry Computer Description of the MEP-021A Generator Set
|
||||
http://www.dtic.mil/docs/citations/ADA073408
|
||||
|
||||
A series of Google GCI tasks worked to transcribe the ASCII COMGEOM
|
||||
description from the original report to text, and post-processed it
|
||||
into a form that the comgeom-g importer can handle:
|
||||
|
||||
http://www.google-melange.com/gci/task/view/google/gci2013/5597236545191936
|
||||
http://www.google-melange.com/gci/task/view/google/gci2014/5293529710460928
|
||||
http://www.google-melange.com/gci/task/view/google/gci2014/5792678377684992
|
||||
|
||||
The file ADA073408_inputs.tar.gz contains the original transcribed
|
||||
files and the script used to create the comgeom file.
|
||||
|
||||
Regular → Executable
+1
-1
@@ -2,7 +2,7 @@
|
||||
# C U B E . R T
|
||||
# BRL-CAD
|
||||
#
|
||||
# Copyright (c) 2004-2026 United States Government as represented by
|
||||
# Copyright (c) 2004-2013 United States Government as represented by
|
||||
# the U.S. Army Research Laboratory.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
/* D B . P H P
|
||||
* BRL-CAD
|
||||
*
|
||||
* Copyright (c) 2004-2026 United States Government as represented by
|
||||
* Copyright (c) 2004-2013 United States Government as represented by
|
||||
* the U.S. Army Research Laboratory.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
@@ -275,14 +275,12 @@ if ($physicalFile) {
|
||||
|
||||
debug("END http request");
|
||||
|
||||
?>
|
||||
|
||||
<!--
|
||||
Local Variables:
|
||||
tab-width: 8
|
||||
mode: php
|
||||
c-basic-offset: 4
|
||||
indent-tabs-mode: t
|
||||
End:
|
||||
ex: shiftwidth=4 tabstop=8
|
||||
-->
|
||||
# Local Variables: ***
|
||||
# mode: C ***
|
||||
# tab-width: 8 ***
|
||||
# c-basic-offset: 2 ***
|
||||
# indent-tabs-mode: t ***
|
||||
# End: ***
|
||||
# ex: shiftwidth=2 tabstop=8
|
||||
?>
|
||||
|
||||
-45
@@ -1,45 +0,0 @@
|
||||
title {A Die by Jeff Sieu. Made for Google Code-in 2017}
|
||||
units mm
|
||||
put {body_outer.r} comb region yes tree {l body_outer.c}
|
||||
attr set {body_outer.r} {oshader} {plastic} {region} {R} {shader} {plastic {re 0.1 ri 1.4 sh 12}} {region_id} {1000} {material_id} {1} {los} {100} {color} {255/255/255}
|
||||
put {body_inner.r} comb region yes tree {l body_inner.c}
|
||||
attr set {body_inner.r} {oshader} {plastic} {region} {R} {shader} {plastic {sp 0.9 di 0.1}} {region_id} {1001} {material_id} {1} {los} {100} {color} {0/0/0}
|
||||
put {body_outer.c} comb region no tree {- {- {n {l body_rpp.s} {l body_sphere.s}} {l dots.c}} {l body_inner.c}}
|
||||
put {body_inner.c} comb region no tree {- {n {l body_rpp_inner.s} {l body_sphere_inner.s}} {l dots.c}}
|
||||
put {cube_edges.c} comb region no tree {u {u {l cube_rcc1.s} {l cube_rcc2.s}} {l cube_rcc3.s}}
|
||||
put {cube_rcc3.s} tgc V {8 10 8} H {0 -20 0} A {0 0 -2} B {2 0 0} C {0 0 -2} D {2 0 0}
|
||||
put {cube_rcc2.s} tgc V {8 8 10} H {0 0 -20} A {0 2 0} B {2 0 0} C {0 2 0} D {2 0 0}
|
||||
put {cube_rcc1.s} tgc V {10 8 8} H {-20 0 0} A {0 0 2} B {0 2 0} C {0 0 2} D {0 2 0}
|
||||
put {body_rpp_inner.s} arb8 V1 {9.900000000000000355271368 -9.900000000000000355271368 -9.900000000000000355271368} V2 {9.900000000000000355271368 9.899999999999986144416653 -9.900000000000000355271368} V3 {9.900000000000000355271368 9.899999999999986144416653 9.900000000000000355271368} V4 {9.900000000000000355271368 -9.900000000000000355271368 9.900000000000000355271368} V5 {-9.899999999999922195570434 -9.900000000000000355271368 -9.900000000000000355271368} V6 {-9.899999999999922195570434 9.899999999999986144416653 -9.900000000000000355271368} V7 {-9.899999999999922195570434 9.899999999999986144416653 9.900000000000000355271368} V8 {-9.899999999999922195570434 -9.900000000000000355271368 9.900000000000000355271368}
|
||||
put {body_rpp.s} arb8 V1 {10 -10 -10} V2 {10 9.999999999999985789145285 -10} V3 {10 9.999999999999985789145285 10} V4 {10 -10 10} V5 {-9.999999999999921840299066 -10 -10} V6 {-9.999999999999921840299066 9.999999999999985789145285 -10} V7 {-9.999999999999921840299066 9.999999999999985789145285 10} V8 {-9.999999999999921840299066 -10 10}
|
||||
put {body_sphere_inner.s} ell V {0 0 0} A {13.4143020316096475141876 0 0} B {0 13.4143020316096475141876 0} C {0 0 13.4143020316096475141876}
|
||||
put {dots6.c} comb region no tree {u {u {u {l sph61.s} {l sph62.s}} {u {l sph63.s} {l sph64.s}}} {u {l sph65.s} {l sph66.s}}}
|
||||
put {dots5.c} comb region no tree {u {u {u {l sph51.s} {l sph52.s}} {u {l sph53.s} {l sph54.s}}} {l sph55.s}}
|
||||
put {dots4.c} comb region no tree {u {u {l sph41.s} {l sph42.s}} {u {l sph43.s} {l sph44.s}}}
|
||||
put {dots3.c} comb region no tree {u {u {l sph31.s} {l sph32.s}} {l sph33.s}}
|
||||
put {dots2.c} comb region no tree {u {l sph21.s} {l sph22.s}}
|
||||
put {dots1.c} comb region no tree {l sph11.s}
|
||||
put {sph66.s} ell V {5.5 -12 -3.5} A {2.751840000000000063806738 0 0} B {0 2.751840000000000063806738 0} C {0 0 2.751840000000000063806738}
|
||||
put {sph65.s} ell V {-5.5 -12 -3.49999999999999955591079} A {2.751840000000000063806738 0 0} B {0 2.751840000000000063806738 0} C {0 0 2.751840000000000063806738}
|
||||
put {sph55.s} ell V {12 4.5 4.5} A {2.86650000000000027000624 0 0} B {0 2.86650000000000027000624 0} C {0 0 2.86650000000000027000624}
|
||||
put {sph64.s} ell V {-5.5 -12 3.5} A {2.751840000000000063806738 0 0} B {0 2.751840000000000063806738 0} C {0 0 2.751840000000000063806738}
|
||||
put {sph54.s} ell V {12 -4.5 4.5} A {2.86650000000000027000624 0 0} B {0 2.86650000000000027000624 0} C {0 0 2.86650000000000027000624}
|
||||
put {sph63.s} ell V {5.5 -12 3.5} A {2.751840000000000063806738 0 0} B {0 2.751840000000000063806738 0} C {0 0 2.751840000000000063806738}
|
||||
put {sph44.s} ell V {-3.5 -3.5 12} A {2.86650000000000027000624 0 0} B {0 2.86650000000000027000624 0} C {0 0 2.86650000000000027000624}
|
||||
put {sph53.s} ell V {12 -4.5 -4.5} A {2.86650000000000027000624 0 0} B {0 2.86650000000000027000624 0} C {0 0 2.86650000000000027000624}
|
||||
put {sph62.s} ell V {0 -12 -3.5} A {2.751840000000000063806738 0 0} B {0 2.751840000000000063806738 0} C {0 0 2.751840000000000063806738}
|
||||
put {sph43.s} ell V {-3.5 3.5 12} A {2.86650000000000027000624 0 0} B {0 2.86650000000000027000624 0} C {0 0 2.86650000000000027000624}
|
||||
put {sph52.s} ell V {12 4.5 -4.5} A {2.86650000000000027000624 0 0} B {0 2.86650000000000027000624 0} C {0 0 2.86650000000000027000624}
|
||||
put {sph61.s} ell V {0 -12 3.50000000000000044408921} A {2.751840000000000063806738 0 0} B {0 2.751840000000000063806738 0} C {0 0 2.751840000000000063806738}
|
||||
put {sph33.s} ell V {-4.5 -4.5 -12} A {2.86650000000000027000624 0 0} B {0 2.86650000000000027000624 0} C {0 0 2.86650000000000027000624}
|
||||
put {sph42.s} ell V {3.5 -3.5 12} A {2.86650000000000027000624 0 0} B {0 2.86650000000000027000624 0} C {0 0 2.86650000000000027000624}
|
||||
put {sph51.s} ell V {12 0 0} A {2.86650000000000027000624 0 0} B {0 2.86650000000000027000624 0} C {0 0 2.86650000000000027000624}
|
||||
put {sph32.s} ell V {0 0 -12} A {2.86650000000000027000624 0 0} B {0 2.86650000000000027000624 0} C {0 0 2.86650000000000027000624}
|
||||
put {sph41.s} ell V {3.5 3.5 12} A {2.86650000000000027000624 0 0} B {0 2.86650000000000027000624 0} C {0 0 2.86650000000000027000624}
|
||||
put {sph22.s} ell V {-11.99999999999999822364316 3.49999999999999911182158 3.49999999999999911182158} A {2.86650000000000027000624 0 0} B {0 2.86650000000000027000624 0} C {0 0 2.86650000000000027000624}
|
||||
put {sph31.s} ell V {4.5 4.5 -12} A {2.86650000000000027000624 0 0} B {0 2.86650000000000027000624 0} C {0 0 2.86650000000000027000624}
|
||||
put {sph21.s} ell V {-11.99999999999998934185896 -3.50000000000000088817842 -3.50000000000000088817842} A {2.86650000000000027000624 0 0} B {0 2.86650000000000027000624 0} C {0 0 2.86650000000000027000624}
|
||||
put {sph11.s} ell V {0 12.5 0} A {2.211859722021807250769143 1.981446994437259911947535 1.852442813782255726096082} B {-1.916905671313780867848209 2.832975207637170811381111 -0.7414338272552269959447813} C {-1.919153255314234307604693 -0.5460030047066275482592346 2.875540210372395932836298}
|
||||
put {dots.c} comb region no tree {u {u {u {l dots1.c} {l dots2.c}} {u {l dots3.c} {l dots4.c}}} {u {l dots5.c} {l dots6.c}}}
|
||||
put {die.g} comb region no tree {u {l body_outer.r} {l body_inner.r}}
|
||||
put {body_sphere.s} ell V {0 0 0} A {13.51430203160964715891623 0 0} B {0 13.51430203160964715891623 0} C {0 0 13.51430203160964715891623}
|
||||
@@ -1,39 +0,0 @@
|
||||
title {Earth Model v1.1 by starseeker}
|
||||
units km
|
||||
put {mesosphere.s} ell V {0 0 0} A {6468100000 0 0} B {0 6468100000 0} C {0 0 6446800000}
|
||||
put {mesosphere.c} comb region no tree {- {l mesosphere.s} {l stratosphere.s}}
|
||||
attr set {mesosphere.c} {shader} {glass {tr 0.85}}
|
||||
put {atmosphere.c} comb region no tree {u {u {- {l mesosphere.c} {l slice-earth-2.s}} {- {l stratosphere.c} {l slice-earth-2.s}}} {- {l troposphere.c} {l slice-earth-2.s}}}
|
||||
put {outer-core.s} ell V {0 0 0} A {-2394906651.625486850738525 1382699999.999999523162842 0} B {-1382699999.999999523162842 -2394906651.625486850738525 0} C {0 0 2750000000}
|
||||
put {inner-core.s} ell V {0 0 0} A {-1047890738.579170942306519 604999999.9999997615814209 0} B {-604999999.9999997615814209 -1047890738.579170942306519 0} C {0 0 1210000000}
|
||||
put {inner-core.r} comb region yes tree {n {l inner-core.s} {l slice-earth-2.s}}
|
||||
attr set {inner-core.r} {color} {255/255/255} {shader} {plastic {sp 0.9 di 0.1}} {region} {R} {region_id} {1003} {material_id} {1} {los} {100}
|
||||
put {lower-mantle-core-subtract.c} comb region no tree {u {l outer-core.s} {l inner-core.s}}
|
||||
put {upper-mantle-core-subtract.c} comb region no tree {u {u {l lower-mantle.s} {l outer-core.s}} {l inner-core.s}}
|
||||
put {slice-earth-outcore.s} arb8 V1 {1000000 1000000 1000000} V2 {1500000000 11550000000 1500000000} V3 {11550000000 1500000000 1500000000} V4 {1000000 1000000 1000000} V5 {1500000000 1500000000 11550000000} V6 {1500000000 1500000000 11550000000} V7 {1500000000 1500000000 11550000000} V8 {1500000000 1500000000 11550000000}
|
||||
put {crust-core-subtract.c} comb region no tree {u {u {l upper-mantle.s} {l lower-mantle.s}} {u {l outer-core.s} {l inner-core.s}}}
|
||||
put {outer-core-display.r} comb region yes tree {- {n {l outer-core.s} {l slice-earth-2.s}} {l inner-core.s}}
|
||||
attr set {outer-core-display.r} {color} {254/255/178} {shader} {plastic} {region} {R} {region_id} {1002} {material_id} {1} {los} {100}
|
||||
put {slice-earth-lowman.s} arb8 V1 {1000000 1000000 1000000} V2 {1000000000 11550000000 1000000000} V3 {11550000000 1000000000 1000000000} V4 {1000000 1000000 1000000} V5 {1000000000 1000000000 11550000000} V6 {1000000000 1000000000 11550000000} V7 {1000000000 1000000000 11550000000} V8 {1000000000 1000000000 11550000000}
|
||||
put {earth-cutaway.c} comb region no tree {- {l earth-crust.c} {l slice-earth.s}}
|
||||
put {earth-display.c} comb region no tree {u {u {u {u {u {l earth-cutaway.c} {l cutout-earth-backdrop.c}} {- {l upper-mantle-display.r} {l slice-earth-upman.s}}} {- {l lower-mantle-display.r} {l slice-earth-lowman.s}}} {- {l outer-core-display.r} {l slice-earth-outcore.s}}} {l inner-core.r}}
|
||||
put {stratosphere.s} ell V {0 0 0} A {6428100000 0 0} B {0 6428100000 0} C {0 0 6406800000}
|
||||
put {stratosphere.c} comb region no tree {- {l stratosphere.s} {l troposphere.s}}
|
||||
attr set {stratosphere.c} {shader} {glass {tr 0.8}}
|
||||
put {cutout-earth-backdrop.c} comb region no tree {n {l cutout-earth.c} {l earth-crust.s}}
|
||||
put {lower-mantle.s} ell V {0 0 0} A {-4900404747.314247131347656 2829249999.999999046325684 0} B {-2829249999.999999046325684 -4900404747.314247131347656 0} C {0 0 5640000000}
|
||||
put {upper-mantle.s} ell V {0 0 0} A {-5474406384.942572593688965 3160649999.999999046325684 0} B {-3160649999.999999046325684 -5474406384.942572593688965 0} C {0 0 6300000000}
|
||||
put {slice-earth-2.s} arb8 V1 {1000000 1000000 1000000} V2 {1000000 11550000000 1000000} V3 {11550000000 1000000 1000000} V4 {1000000 1000000 1000000} V5 {1000000 1000000 11550000000} V6 {1000000 1000000 11550000000} V7 {1000000 1000000 11550000000} V8 {1000000 1000000 11550000000}
|
||||
put {slice-earth-upman.s} arb8 V1 {1000000 1000000 1000000} V2 {500000000 11550000000 500000000} V3 {11550000000 500000000 500000000} V4 {1000000 1000000 1000000} V5 {500000000 500000000 11550000000} V6 {500000000 500000000 11550000000} V7 {500000000 500000000 11550000000} V8 {500000000 500000000 11550000000}
|
||||
put {cutout-earth.c} comb region no tree {- {l slice-earth.s} {l slice-earth-2.s}}
|
||||
put {troposphere.s} ell V {0 0 0} A {6396100000 0 0} B {0 6396100000 0} C {0 0 6374800000}
|
||||
put {earth-crust.s} ell V {0 0 0} A {-5523596627.877529144287109 3189049999.999999046325684 0} B {-3189049999.999999046325684 -5523596627.877529144287109 0} C {0 0 6356800000}
|
||||
put {troposphere.c} comb region no tree {- {l troposphere.s} {l earth-crust.s}}
|
||||
attr set {troposphere.c} {shader} {stack {{cloud {}} {glass {tr 0.65}}}}
|
||||
put {earth-crust.c} comb region no tree {- {l earth-crust.s} {l crust-core-subtract.c}}
|
||||
attr set {earth-crust.c} {shader} {texture {file earth.pix w 2048 n 1024}}
|
||||
put {slice-earth.s} arb8 V1 {0 0 0} V2 {0 11500000000 0} V3 {11500000000 0 0} V4 {0 0 0} V5 {0 0 11500000000} V6 {0 0 11500000000} V7 {0 0 11500000000} V8 {0 0 11500000000}
|
||||
put {lower-mantle-display.r} comb region yes tree {- {n {l lower-mantle.s} {l slice-earth-2.s}} {l lower-mantle-core-subtract.c}}
|
||||
attr set {lower-mantle-display.r} {color} {255/255/0} {shader} {plastic} {region} {R} {region_id} {1001} {material_id} {1} {los} {100}
|
||||
put {upper-mantle-display.r} comb region yes tree {- {n {l upper-mantle.s} {l slice-earth-2.s}} {l upper-mantle-core-subtract.c}}
|
||||
attr set {upper-mantle-display.r} {color} {254/160/60} {shader} {plastic} {region} {R} {region_id} {1000} {material_id} {1} {los} {100}
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 1.6 MiB |
Binary file not shown.
@@ -1,856 +0,0 @@
|
||||
$COMMENT Generic Business Jet Rotor Burst Model
|
||||
$COMMENT Todd Horelica
|
||||
$COMMENT 28 Jan 2000
|
||||
$COMMENT
|
||||
$COMMENT The generic aircraft models were developed in support of the Federal
|
||||
$COMMENT Aviation Administration's Aircraft Catastrophic Failure Prevention
|
||||
$COMMENT Program. The models are used to demonstrate the Uncontained Engine
|
||||
$COMMENT Debris Damage Assessment Model (UEDDAM) tool which evaluates the risk
|
||||
$COMMENT to the aircraft from uncontained engine failures. This analysis
|
||||
$COMMENT supports certification to Title 14 Code of Federal Regulations,
|
||||
$COMMENT Part 25.903. The models are for demonstration purposes and do not
|
||||
$COMMENT depict actual aircraft and /or Aircraft systems in service. The models
|
||||
$COMMENT are available for public release.
|
||||
$COMMENT
|
||||
$COMMENT Note: Right and left are with respect to looking forward from the tail;
|
||||
$COMMENT i.e. the pilot's perspective
|
||||
$COMMENT123456781234567812345678123456781234567812345678123456781234567812345678
|
||||
$COMMENT
|
||||
$NAME 0 1 Right Engine Nacelle
|
||||
SECTION 0 1 1 1
|
||||
GRID 1 -375.96 -64.08 145.47
|
||||
GRID 2 -491.31 -64.08 145.47
|
||||
CCONE1 1 8 1 2 0.04 19.010000001
|
||||
10000001 19.0 1 1
|
||||
$NAME 0 11 Left Engine Nacelle
|
||||
SECTION 0 11 1 1
|
||||
GRID 3 -375.96 64.08 145.47
|
||||
GRID 4 -491.31 64.08 145.47
|
||||
CCONE1 2 8 3 4 0.04 19.010000002
|
||||
10000002 19.0 1 1
|
||||
$COMMENT123456781234567812345678123456781234567812345678123456781234567812345678
|
||||
$COMMENT Pylons
|
||||
$NAME 0 2 Left Pylon
|
||||
SECTION 0 2 1 5
|
||||
GRID 5 -392.28 45.24 142.98
|
||||
GRID 6 -392.17 32.83 139.44
|
||||
GRID 7 -494.47 45.24 142.98
|
||||
GRID 8 -505.76 25.48 137.36
|
||||
GRID 9 -392.28 46.75 137.69
|
||||
GRID 10 -392.17 34.33 134.15
|
||||
GRID 11 -494.47 46.75 137.69
|
||||
GRID 12 -505.76 26.99 132.07
|
||||
CQUAD 51 8 5 9 11 7 0.032 1
|
||||
CQUAD 52 8 5 6 10 9 0.032 1
|
||||
CQUAD 53 8 6 8 12 10 0.032 1
|
||||
CQUAD 54 8 7 8 12 11 0.032 1
|
||||
CQUAD 55 8 5 6 8 7 0.032 1
|
||||
CQUAD 56 8 9 10 12 11 0.032 1
|
||||
$COMMENT123456781234567812345678123456781234567812345678123456781234567812345678
|
||||
$NAME 0 3 Right Pylon
|
||||
SECTION 0 3 1 5
|
||||
GRID 13 -392.28 -45.24 142.98
|
||||
GRID 14 -392.17 -32.83 139.44
|
||||
GRID 15 -494.47 -45.24 142.98
|
||||
GRID 16 -505.76 -25.48 137.36
|
||||
GRID 17 -392.28 -46.75 137.69
|
||||
GRID 18 -392.17 -34.33 134.15
|
||||
GRID 19 -494.47 -46.75 137.69
|
||||
GRID 20 -505.76 -26.99 132.07
|
||||
CQUAD 61 8 13 17 19 15 0.032 1
|
||||
CQUAD 62 8 13 14 18 17 0.032 1
|
||||
CQUAD 63 8 14 16 20 18 0.032 1
|
||||
CQUAD 64 8 15 16 20 19 0.032 1
|
||||
CQUAD 65 8 13 14 16 15 0.032 1
|
||||
CQUAD 66 8 17 18 20 19 0.032 1
|
||||
$COMMENT123456781234567812345678123456781234567812345678123456781234567812345678
|
||||
$NAME 0 4 Aft Fuselage
|
||||
SECTION 0 4 1 1
|
||||
GRID 21 -373.75 -0.00 127.25
|
||||
GRID 22 -512.50 -0.00 127.25
|
||||
CCONE1 3 8 21 22 0.032 36.2510000003
|
||||
10000003 26.96 1 1
|
||||
$COMMENT123456781234567812345678123456781234567812345678123456781234567812345678
|
||||
$NAME 0 101 Fairing
|
||||
SECTION 0 101 1 1
|
||||
GRID 223 -512.50 -0.00 100.27
|
||||
GRID 224 -373.75 33.49 75.73
|
||||
GRID 225 -373.75 -33.49 75.73
|
||||
GRID 226 -373.75 33.49 127.25
|
||||
GRID 227 -373.75 -33.49 127.25
|
||||
CQUAD 87 8 224 225 227 226 0.032 1
|
||||
CTRI 88 8 223 224 226 0.032 1
|
||||
CTRI 89 8 223 224 225 0.032 1
|
||||
CTRI 90 8 223 225 227 0.032 1
|
||||
$COMMENT123456781234567812345678123456781234567812345678123456781234567812345678
|
||||
$COMMENT Rotors
|
||||
$NAME 1 1 Right Engine Fan
|
||||
SECTION 1 1 2
|
||||
GRID 294 -408.33 -64.08 145.47
|
||||
GRID 295 -411.58 -64.08 145.47
|
||||
CCONE2 1 7 294 295 13.609C90
|
||||
C90 13.609 0 0
|
||||
$COMMENT123456781234567812345678123456781234567812345678123456781234567812345678
|
||||
$NAME 1 2 Right LPC1
|
||||
SECTION 1 2 2
|
||||
GRID 296 -416.62 -64.08 145.47
|
||||
GRID 297 -418.62 -64.08 145.47
|
||||
CCONE2 2 4 296 297 8.543C905
|
||||
C905 8.543 0 0
|
||||
$COMMENT123456781234567812345678123456781234567812345678123456781234567812345678
|
||||
$NAME 1 3 Right HPC1
|
||||
SECTION 1 3 2
|
||||
GRID 298 -427.25 -64.08 145.47
|
||||
GRID 299 -429.00 -64.08 145.47
|
||||
CCONE2 3 4 298 299 5.09C91
|
||||
C91 5.09 0 0
|
||||
$COMMENT123456781234567812345678123456781234567812345678123456781234567812345678
|
||||
$NAME 1 4 Right HPC2
|
||||
SECTION 1 4 2
|
||||
GRID 300 -431.36 -64.08 145.47
|
||||
GRID 301 -432.61 -64.08 145.47
|
||||
CCONE2 4 4 300 301 4.898C92
|
||||
C92 4.898 0 0
|
||||
$COMMENT123456781234567812345678123456781234567812345678123456781234567812345678
|
||||
$NAME 1 5 Right HPC3
|
||||
SECTION 1 5 2
|
||||
GRID 302 -436.69 -64.08 145.47
|
||||
GRID 303 -439.69 -64.08 145.47
|
||||
CCONE2 5 4 302 303 6.644C93
|
||||
C93 6.644 0 0
|
||||
$COMMENT123456781234567812345678123456781234567812345678123456781234567812345678
|
||||
$NAME 1 6 Right HPT1
|
||||
SECTION 1 6 2
|
||||
GRID 304 -443.53 -64.08 145.47
|
||||
GRID 305 -445.28 -64.08 145.47
|
||||
CCONE2 6 4 304 305 5.784C94
|
||||
C94 5.784 0 0
|
||||
$COMMENT123456781234567812345678123456781234567812345678123456781234567812345678
|
||||
$NAME 1 7 Right LPT1
|
||||
SECTION 1 7 2
|
||||
GRID 306 -447.46 -64.08 145.47
|
||||
GRID 307 -448.21 -64.08 145.47
|
||||
CCONE2 7 4 306 307 7.286C95
|
||||
C95 7.286 0 0
|
||||
$COMMENT123456781234567812345678123456781234567812345678123456781234567812345678
|
||||
$NAME 1 8 Right LPT2
|
||||
SECTION 1 8 2
|
||||
GRID 308 -450.10 -64.08 145.47
|
||||
GRID 309 -450.98 -64.08 145.47
|
||||
CCONE2 8 4 308 309 8.63C96
|
||||
C96 8.63 0 0
|
||||
$COMMENT123456781234567812345678123456781234567812345678123456781234567812345678
|
||||
$NAME 1 9 Right LPT3
|
||||
SECTION 1 9 2
|
||||
GRID 310 -453.05 -64.08 145.47
|
||||
GRID 311 -454.05 -64.08 145.47
|
||||
CCONE2 9 4 310 311 8.985C97
|
||||
C97 8.985 0 0
|
||||
$COMMENT123456781234567812345678123456781234567812345678123456781234567812345678
|
||||
$NAME 1 21 Right Engine Case
|
||||
SECTION 1 21 1
|
||||
GRID 332 -407.83 -64.08 145.47
|
||||
GRID 333 -454.55 -64.08 145.47
|
||||
CCONE1 21 4 332 333 0.1 14.109C332
|
||||
C332 14.109 1 1
|
||||
$COMMENT123456781234567812345678123456781234567812345678123456781234567812345678
|
||||
$NAME 1 11 Left Engine Fan
|
||||
SECTION 1 11 2
|
||||
GRID 312 -408.33 64.08 145.47
|
||||
GRID 313 -411.58 64.08 145.47
|
||||
CCONE2 10 7 312 313 13.609C98
|
||||
C98 13.609 0 0
|
||||
$COMMENT123456781234567812345678123456781234567812345678123456781234567812345678
|
||||
$NAME 1 12 Left LPC2
|
||||
SECTION 1 12 2
|
||||
GRID 314 -416.62 64.08 145.47
|
||||
GRID 315 -418.62 64.08 145.47
|
||||
CCONE2 19 4 314 315 8.543C985
|
||||
C985 8.543 0 0
|
||||
$COMMENT123456781234567812345678123456781234567812345678123456781234567812345678
|
||||
$NAME 1 13 Left HPC1
|
||||
SECTION 1 13 2
|
||||
GRID 316 -427.25 64.08 145.47
|
||||
GRID 317 -429.00 64.08 145.47
|
||||
CCONE2 11 4 316 317 5.09C99
|
||||
C99 5.09 0 0
|
||||
$COMMENT123456781234567812345678123456781234567812345678123456781234567812345678
|
||||
$NAME 1 14 Left HPC2
|
||||
SECTION 1 14 2
|
||||
GRID 318 -431.36 64.08 145.47
|
||||
GRID 319 -432.61 64.08 145.47
|
||||
CCONE2 12 4 318 319 4.898C100
|
||||
C100 4.898 0 0
|
||||
$COMMENT123456781234567812345678123456781234567812345678123456781234567812345678
|
||||
$NAME 1 15 Left HPC3
|
||||
SECTION 1 15 2
|
||||
GRID 320 -436.69 64.08 145.47
|
||||
GRID 321 -439.69 64.08 145.47
|
||||
CCONE2 13 4 320 321 6.644C101
|
||||
C101 6.644 0 0
|
||||
$COMMENT123456781234567812345678123456781234567812345678123456781234567812345678
|
||||
$NAME 1 16 Left HPT1
|
||||
SECTION 1 16 2
|
||||
GRID 322 -443.53 64.08 145.47
|
||||
GRID 323 -445.28 64.08 145.47
|
||||
CCONE2 14 4 322 323 5.784C102
|
||||
C102 5.784 0 0
|
||||
$COMMENT123456781234567812345678123456781234567812345678123456781234567812345678
|
||||
$NAME 1 17 Left LPT1
|
||||
SECTION 1 17 2
|
||||
GRID 324 -447.46 64.08 145.47
|
||||
GRID 325 -448.21 64.08 145.47
|
||||
CCONE2 15 4 324 325 7.286C103
|
||||
C103 7.286 0 0
|
||||
$COMMENT123456781234567812345678123456781234567812345678123456781234567812345678
|
||||
$NAME 1 18 Left LPT2
|
||||
SECTION 1 18 2
|
||||
GRID 326 -450.10 64.08 145.47
|
||||
GRID 327 -450.98 64.08 145.47
|
||||
CCONE2 16 4 326 327 8.63C104
|
||||
C104 8.63 0 0
|
||||
$COMMENT123456781234567812345678123456781234567812345678123456781234567812345678
|
||||
$NAME 1 19 Left LPT3
|
||||
SECTION 1 19 2
|
||||
GRID 328 -453.05 64.08 145.47
|
||||
GRID 329 -454.05 64.08 145.47
|
||||
CCONE2 17 4 328 329 8.985C105
|
||||
C105 8.985 0 0
|
||||
$COMMENT123456781234567812345678123456781234567812345678123456781234567812345678
|
||||
$NAME 1 22 Left Engine Case
|
||||
SECTION 1 22 1
|
||||
GRID 334 -407.83 64.08 145.47
|
||||
GRID 335 -454.55 64.08 145.47
|
||||
CCONE1 22 4 334 335 0.1 14.109C333
|
||||
C333 14.109 1 1
|
||||
$COMMENT123456781234567812345678123456781234567812345678123456781234567812345678
|
||||
$COMMENT Control Cables
|
||||
$NAME 3 1 Elevator Control Cables
|
||||
SECTION 3 1 1
|
||||
GRID 256 -373.75 13.97 90.17
|
||||
GRID 257 -446.98 -2.25 95.25
|
||||
GRID 258 -512.50 -1.03 104.95
|
||||
GRID 259 -373.75 6.07 88.65
|
||||
GRID 260 -446.96 -2.70 95.40
|
||||
GRID 261 -512.50 -1.63 105.02
|
||||
CLINE 1 4 256 257 0.063 0.063
|
||||
CLINE 2 4 257 258 0.063 0.063
|
||||
CLINE 3 4 259 260 0.063 0.063
|
||||
CLINE 4 4 260 261 0.063 0.063
|
||||
$COMMENT123456781234567812345678123456781234567812345678123456781234567812345678
|
||||
$NAME 3 2 Elevator Trim Cables
|
||||
SECTION 3 2 1
|
||||
GRID 262 -373.75 -26.11 99.49
|
||||
GRID 263 -388.77 -26.11 99.49
|
||||
GRID 264 -385.59 -5.80 160.33
|
||||
GRID 265 -512.50 -5.80 150.95
|
||||
GRID 266 -375.75 -25.70 99.35
|
||||
GRID 267 -388.78 -25.70 99.35
|
||||
GRID 268 -385.59 -5.80 159.88
|
||||
GRID 269 -512.50 -5.80 150.50
|
||||
CLINE 5 4 262 263 0.063 0.063
|
||||
CLINE 6 4 263 264 0.063 0.063
|
||||
CLINE 7 4 264 265 0.063 0.063
|
||||
CLINE 8 4 266 267 0.063 0.063
|
||||
CLINE 9 4 267 268 0.063 0.063
|
||||
CLINE 10 4 268 269 0.063 0.063
|
||||
$COMMENT123456781234567812345678123456781234567812345678123456781234567812345678
|
||||
$NAME 3 101 Rudder-Upper
|
||||
SECTION 3 101 1
|
||||
GRID 270 -373.75 -3.72 90.59
|
||||
GRID 271 -384.74 -3.78 90.59
|
||||
GRID 272 -391.84 -5.80 158.00
|
||||
GRID 273 -512.50 -5.80 149.08
|
||||
GRID 274 -373.75 -9.62 91.68
|
||||
GRID 275 -383.88 -9.54 91.68
|
||||
GRID 276 -392.62 -7.04 157.94
|
||||
GRID 277 -512.50 -7.04 149.08
|
||||
CLINE 11 4 270 271 0.063 0.063
|
||||
CLINE 12 4 271 272 0.063 0.063
|
||||
CLINE 13 4 272 273 0.063 0.063
|
||||
CLINE 14 4 274 275 0.063 0.063
|
||||
CLINE 15 4 275 276 0.063 0.063
|
||||
CLINE 16 4 276 277 0.063 0.063
|
||||
$COMMENT123456781234567812345678123456781234567812345678123456781234567812345678
|
||||
$NAME 3 102 Rudder-Lower
|
||||
SECTION 3 102 1
|
||||
GRID 278 -373.75 -3.85 89.54
|
||||
GRID 279 -448.81 -3.15 95.48
|
||||
GRID 280 -512.50 -5.55 106.78
|
||||
GRID 281 -373.75 -11.73 90.18
|
||||
GRID 282 -448.78 -3.68 95.40
|
||||
GRID 283 -512.50 -6.18 107.18
|
||||
CLINE 17 4 278 279 0.063 0.063
|
||||
CLINE 18 4 279 280 0.063 0.063
|
||||
CLINE 19 4 281 282 0.063 0.063
|
||||
CLINE 20 4 282 283 0.063 0.063
|
||||
$COMMENT123456781234567812345678123456781234567812345678123456781234567812345678
|
||||
$NAME 3 103 Rudder Trim
|
||||
SECTION 3 103 1
|
||||
GRID 284 -375.75 25.28 99.20
|
||||
GRID 285 -388.78 25.28 99.20
|
||||
GRID 286 -385.54 5.55 159.17
|
||||
GRID 287 -406.34 -5.80 157.47
|
||||
GRID 288 -512.50 -5.80 149.62
|
||||
GRID 289 -373.75 26.53 99.63
|
||||
GRID 290 -388.76 26.53 99.63
|
||||
GRID 291 -385.75 5.95 159.27
|
||||
GRID 292 -406.37 -5.80 157.91
|
||||
GRID 293 -512.50 -5.80 150.06
|
||||
CLINE 21 4 284 285 0.063 0.063
|
||||
CLINE 22 4 285 286 0.063 0.063
|
||||
CLINE 23 4 286 287 0.063 0.063
|
||||
CLINE 24 4 287 288 0.063 0.063
|
||||
CLINE 25 4 289 290 0.063 0.063
|
||||
CLINE 26 4 290 291 0.063 0.063
|
||||
CLINE 27 4 291 292 0.063 0.063
|
||||
CLINE 28 4 292 293 0.063 0.063
|
||||
$COMMENT123456781234567812345678123456781234567812345678123456781234567812345678
|
||||
$COMMENT Fuel Lines
|
||||
$NAME 4 1 Fuel Supply Line (Right Side)
|
||||
SECTION 4 1 1 1
|
||||
GRID 23 -378.88 -23.20 99.85
|
||||
GRID 24 -380.84 -28.57 144.05
|
||||
GRID 25 -428.13 -21.15 144.62
|
||||
GRID 26 -428.85 -24.92 136.29
|
||||
GRID 27 -427.79 -45.94 140.51
|
||||
CLINE 1 12 23 24 0.035 0.5
|
||||
CLINE 2 12 24 25 0.035 0.5
|
||||
CLINE 3 12 25 26 0.035 0.5
|
||||
CLINE 4 12 26 27 0.035 0.5
|
||||
$COMMENT123456781234567812345678123456781234567812345678123456781234567812345678
|
||||
$NAME 4 2 Fuel Supply Line (Left Side)
|
||||
SECTION 4 2 1 1
|
||||
GRID 28 -378.88 23.20 99.85
|
||||
GRID 29 -380.84 28.57 144.05
|
||||
GRID 30 -428.13 21.15 144.62
|
||||
GRID 31 -428.85 24.92 136.29
|
||||
GRID 32 -427.79 45.94 140.51
|
||||
CLINE 5 12 28 29 0.035 0.5
|
||||
CLINE 6 12 29 30 0.035 0.5
|
||||
CLINE 7 12 30 31 0.035 0.5
|
||||
CLINE 8 12 31 32 0.035 0.5
|
||||
$COMMENT123456781234567812345678123456781234567812345678123456781234567812345678
|
||||
$NAME 4 3 Fuel Motive Flow Line (Right Side)
|
||||
SECTION 4 3 1 1
|
||||
GRID 33 -378.82 -21.40 98.41
|
||||
GRID 34 -380.84 -26.92 143.90
|
||||
GRID 35 -428.20 -19.50 144.48
|
||||
GRID 36 -428.89 -24.34 133.86
|
||||
GRID 37 -427.77 -46.57 138.33
|
||||
CLINE 9 12 33 34 0.035 0.25
|
||||
CLINE 10 12 34 35 0.035 0.25
|
||||
CLINE 11 12 35 36 0.035 0.25
|
||||
CLINE 12 12 36 37 0.035 0.25
|
||||
$COMMENT123456781234567812345678123456781234567812345678123456781234567812345678
|
||||
$NAME 4 4 Fuel Motive Flow Line (Left Side)
|
||||
SECTION 4 4 1 1
|
||||
GRID 38 -378.82 21.40 98.41
|
||||
GRID 39 -380.84 26.92 143.90
|
||||
GRID 40 -428.20 19.50 144.48
|
||||
GRID 41 -428.89 24.34 133.86
|
||||
GRID 42 -427.77 46.57 138.33
|
||||
CLINE 13 12 38 39 0.035 0.25
|
||||
CLINE 14 12 39 40 0.035 0.25
|
||||
CLINE 15 12 40 41 0.035 0.25
|
||||
CLINE 16 12 41 42 0.035 0.25
|
||||
$COMMENT123456781234567812345678123456781234567812345678123456781234567812345678
|
||||
$COMMENT Structure
|
||||
$NAME 7 1 Left Forward Engine Beam (1st 2 outboard; 2nd 2 inboard)
|
||||
SECTION 7 1 1 1
|
||||
GRID 43 -421.50 45.35 142.87
|
||||
GRID 44 -421.50 46.64 137.80
|
||||
GRID 45 -421.50 31.04 138.79
|
||||
GRID 46 -421.50 32.33 133.72
|
||||
$COMMENT Forward Engine Beam, Back Side (1st 2 outboard; 2nd 2 inboard)
|
||||
GRID 47 -424.50 45.35 142.87
|
||||
GRID 48 -424.50 46.64 137.80
|
||||
GRID 49 -424.50 30.85 138.74
|
||||
GRID 50 -424.50 32.13 133.67
|
||||
CQUAD 1 8 49 45 43 47 0.190 1
|
||||
CQUAD 2 8 49 47 48 50 0.100 1
|
||||
CQUAD 3 8 44 46 50 48 0.190 1
|
||||
CQUAD 4 8 44 46 45 43 0.100 1
|
||||
$COMMENT123456781234567812345678123456781234567812345678123456781234567812345678
|
||||
$NAME 7 2 Forward Beam through fuselage
|
||||
SECTION 7 2 1 1
|
||||
GRID 45 -421.50 31.04 138.79
|
||||
GRID 46 -421.50 32.33 133.72
|
||||
GRID 61 -421.50 -31.04 138.79
|
||||
GRID 62 -421.50 -32.33 133.72
|
||||
GRID 49 -424.50 30.85 138.74
|
||||
GRID 50 -424.50 32.13 133.67
|
||||
GRID 65 -424.50 -30.85 138.74
|
||||
GRID 66 -424.50 -32.13 133.67
|
||||
CQUAD 17 8 45 46 62 61 0.100 1
|
||||
CQUAD 18 8 49 50 66 65 0.100 1
|
||||
CQUAD 19 8 45 49 65 61 0.190 1
|
||||
CQUAD 20 8 46 50 66 62 0.190 1
|
||||
$COMMENT123456781234567812345678123456781234567812345678123456781234567812345678
|
||||
$NAME 7 3 Right Forward Engine Beam (1st 2 outboard; 2nd 2 inboard)
|
||||
SECTION 7 3 1 1
|
||||
GRID 59 -421.50 -45.35 142.87
|
||||
GRID 60 -421.50 -46.64 137.80
|
||||
GRID 61 -421.50 -31.04 138.79
|
||||
GRID 62 -421.50 -32.33 133.72
|
||||
$COMMENT Forward Engine Beam, Back Side (1st 2 outboard; 2nd 2 inboard)
|
||||
GRID 63 -424.50 -45.35 142.87
|
||||
GRID 64 -424.50 -46.64 137.80
|
||||
GRID 65 -424.50 -30.85 138.74
|
||||
GRID 66 -424.50 -32.13 133.67
|
||||
CQUAD 9 8 65 61 59 63 0.190 1
|
||||
CQUAD 10 8 65 63 64 66 0.100 1
|
||||
CQUAD 11 8 60 62 66 64 0.190 1
|
||||
CQUAD 12 8 60 62 61 59 0.100 1
|
||||
$COMMENT123456781234567812345678123456781234567812345678123456781234567812345678
|
||||
$NAME 7 11 Left Aft Engine Beam (1st 2 outboard; 2nd 2 inboard)
|
||||
SECTION 7 11 1 1
|
||||
GRID 51 -460.50 45.14 142.88
|
||||
GRID 52 -460.50 46.68 137.76
|
||||
GRID 53 -460.50 28.51 138.09
|
||||
GRID 54 -460.50 29.85 132.97
|
||||
$COMMENT Left Aft Engine Beam Back Side (1st 2 outboard; 2nd 2 inboard)
|
||||
GRID 55 -462.50 45.14 142.88
|
||||
GRID 56 -462.50 46.68 137.76
|
||||
GRID 57 -462.50 28.38 138.05
|
||||
GRID 58 -462.50 29.72 132.93
|
||||
CQUAD 5 8 57 53 51 55 0.160 1
|
||||
CQUAD 6 8 57 55 56 58 0.064 1
|
||||
CQUAD 7 8 52 54 58 56 0.100 1
|
||||
CQUAD 8 8 52 54 53 51 0.064 1
|
||||
$COMMENT123456781234567812345678123456781234567812345678123456781234567812345678
|
||||
$NAME 7 12 Aft Engine Beam through fuselage
|
||||
SECTION 7 12 1 1
|
||||
GRID 53 -460.50 28.51 138.09
|
||||
GRID 54 -460.50 29.85 132.97
|
||||
GRID 57 -462.50 28.38 138.05
|
||||
GRID 58 -462.50 29.72 132.93
|
||||
GRID 69 -460.50 -28.51 138.09
|
||||
GRID 70 -460.50 -29.85 132.97
|
||||
GRID 73 -462.50 -28.38 138.05
|
||||
GRID 74 -462.50 -29.72 132.93
|
||||
CQUAD 21 8 53 54 70 69 0.064 1
|
||||
CQUAD 22 8 57 58 74 73 0.064 1
|
||||
CQUAD 23 8 53 57 73 69 0.160 1
|
||||
CQUAD 24 8 54 58 74 70 0.100 1
|
||||
$COMMENT123456781234567812345678123456781234567812345678123456781234567812345678
|
||||
$NAME 7 13 Right Aft Engine Beam (1st 2 outboard; 2nd 2 inboard)
|
||||
SECTION 7 13 1 1
|
||||
GRID 67 -460.50 -45.14 142.88
|
||||
GRID 68 -460.50 -46.68 137.76
|
||||
GRID 69 -460.50 -28.51 138.09
|
||||
GRID 70 -460.50 -29.85 132.97
|
||||
$COMMENT Aft Engine Beam Back Side (1st 2 outboard; 2nd 2 inboard)
|
||||
GRID 71 -462.50 -45.14 142.88
|
||||
GRID 72 -462.50 -46.68 137.76
|
||||
GRID 73 -462.50 -28.38 138.05
|
||||
GRID 74 -462.50 -29.72 132.93
|
||||
CQUAD 13 8 73 69 67 71 0.160 1
|
||||
CQUAD 16 8 68 70 69 67 0.064 1
|
||||
CQUAD 14 8 73 71 72 74 0.064 1
|
||||
CQUAD 15 8 68 70 74 72 0.100 1
|
||||
$COMMENT123456781234567812345678123456781234567812345678123456781234567812345678
|
||||
$Frames
|
||||
$COMMENT The number in parenthesis () is the actual location relative to the origin.
|
||||
$COMMENT The other numbers are the numbers provided by the original source.
|
||||
$NAME 7 51 Frame at FS 389.5
|
||||
SECTION 7 51 1 1
|
||||
GRID 75 -389.50 -0.00 127.25
|
||||
GRID 76 -390.25 -0.00 127.25
|
||||
CCONE1 5 8 75 76 0.032 35.163C1
|
||||
C1 35.113 1 1
|
||||
$COMMENT123456781234567812345678123456781234567812345678123456781234567812345678
|
||||
$NAME 7 52 Frame at FS 405.5
|
||||
SECTION 7 52 1 1
|
||||
GRID 77 -405.50 -0.00 127.25
|
||||
GRID 78 -406.25 -0.00 127.25
|
||||
CCONE1 6 8 77 78 0.032 34.092C2
|
||||
C2 34.042 1 1
|
||||
$COMMENT123456781234567812345678123456781234567812345678123456781234567812345678
|
||||
$NAME 7 53 Frame at FS 479.5
|
||||
SECTION 7 53 1 1
|
||||
GRID 79 -479.50 -0.00 127.25
|
||||
GRID 80 -480.25 -0.00 127.25
|
||||
CCONE1 7 8 79 80 0.032 29.138C3
|
||||
C3 29.087 1 1
|
||||
$COMMENT123456781234567812345678123456781234567812345678123456781234567812345678
|
||||
$NAME 7 54 Frame at FS 496.5
|
||||
SECTION 7 54 1 1
|
||||
GRID 81 -496.50 -0.00 127.25
|
||||
GRID 82 -497.25 -0.00 127.25
|
||||
CCONE1 8 8 81 82 0.032 28.00C4
|
||||
C4 27.95 1 1
|
||||
$COMMENT123456781234567812345678123456781234567812345678123456781234567812345678
|
||||
$NAME 7 55 Frame at FS 512.5
|
||||
SECTION 7 55 1 1
|
||||
GRID 83 -512.50 -0.00 127.25
|
||||
GRID 84 -513.25 -0.00 127.25
|
||||
CCONE1 9 8 83 84 0.032 26.928C5
|
||||
C5 26.846 1 1
|
||||
$COMMENT123456781234567812345678123456781234567812345678123456781234567812345678
|
||||
$COMMENT Engine Beam Frames
|
||||
$NAME 7 61 Frame at FS 420.75
|
||||
SECTION 7 61 1 1
|
||||
GRID 85 -420.75 -0.00 127.25
|
||||
GRID 86 -421.50 -0.00 127.25
|
||||
CCONE1 10 8 85 86 0.032 33.07C6
|
||||
C6 33.021 1 1
|
||||
$COMMENT123456781234567812345678123456781234567812345678123456781234567812345678
|
||||
$NAME 7 62 Frame at FS 424.5
|
||||
SECTION 7 62 1 1
|
||||
GRID 87 -424.50 -0.00 127.25
|
||||
GRID 88 -425.25 -0.00 127.25
|
||||
CCONE1 11 8 87 88 0.032 32.82C7
|
||||
C7 32.77 1 1
|
||||
$COMMENT123456781234567812345678123456781234567812345678123456781234567812345678
|
||||
$NAME 7 63 Frame at FS 459.75
|
||||
SECTION 7 63 1 1
|
||||
GRID 89 -459.75 -0.00 127.25
|
||||
GRID 90 -460.50 -0.00 127.25
|
||||
CCONE1 12 8 89 90 0.032 30.46C8
|
||||
C8 30.41 1 1
|
||||
$COMMENT123456781234567812345678123456781234567812345678123456781234567812345678
|
||||
$NAME 7 64 Frame at FS 462.5
|
||||
SECTION 7 64 1 1
|
||||
GRID 91 -462.50 -0.00 127.25
|
||||
GRID 92 -463.25 -0.00 127.25
|
||||
CCONE1 13 8 91 92 0.032 30.28C9
|
||||
C9 30.23 1 1
|
||||
$COMMENT123456781234567812345678123456781234567812345678123456781234567812345678
|
||||
$NAME 7 65 Frame at FS 442.5
|
||||
$COMMENT (Missing frame--goes between the two engine beam frames)
|
||||
SECTION 7 65 1 1
|
||||
GRID 93 -442.50 -0.00 127.25
|
||||
GRID 94 -443.25 -0.00 127.25
|
||||
CCONE1 14 8 93 94 0.032 31.615C10
|
||||
C10 31.565 1 1
|
||||
$COMMENT123456781234567812345678123456781234567812345678123456781234567812345678
|
||||
$COMMENT Stringers
|
||||
$NAME 7 101 Stringer 1
|
||||
SECTION 7 101 1 1
|
||||
GRID 95 -373.75 0.75 91.13
|
||||
GRID 96 -373.75 -0.75 91.13
|
||||
GRID 97 -512.50 0.75 100.42
|
||||
GRID 98 -512.50 -0.75 100.42
|
||||
CQUAD 15 13 95 96 98 97 0.045 1
|
||||
$COMMENT123456781234567812345678123456781234567812345678123456781234567812345678
|
||||
$NAME 7 102 Stringer 2
|
||||
SECTION 7 102 1 1
|
||||
GRID 99 -373.75 0.75 163.38
|
||||
GRID 100 -373.75 -0.75 163.38
|
||||
GRID 101 -512.50 0.75 154.09
|
||||
GRID 102 -512.50 -0.75 154.09
|
||||
CQUAD 16 13 99 100 102 101 0.045 1
|
||||
$COMMENT123456781234567812345678123456781234567812345678123456781234567812345678
|
||||
$NAME 7 103 Stringer 3
|
||||
SECTION 7 103 1 1
|
||||
GRID 103 -373.75 6.00 162.51
|
||||
GRID 104 -373.75 7.49 162.24
|
||||
GRID 105 -512.50 4.25 153.47
|
||||
GRID 106 -512.50 5.72 153.17
|
||||
CQUAD 17 13 103 104 106 105 0.045 1
|
||||
$COMMENT123456781234567812345678123456781234567812345678123456781234567812345678
|
||||
$NAME 7 104 Stringer 4
|
||||
SECTION 7 104 1 1
|
||||
GRID 107 -373.75 -6.00 162.51
|
||||
GRID 108 -373.75 -7.49 162.24
|
||||
GRID 109 -512.50 -4.25 153.47
|
||||
GRID 110 -512.50 -5.72 153.17
|
||||
CQUAD 18 13 107 108 110 109 0.045 1
|
||||
$COMMENT123456781234567812345678123456781234567812345678123456781234567812345678
|
||||
$NAME 7 105 Stringer 5
|
||||
SECTION 7 105 1 1
|
||||
GRID 111 -373.75 12.78 160.63
|
||||
GRID 112 -373.75 14.11 160.05
|
||||
GRID 113 -512.50 9.22 152.04
|
||||
GRID 114 -512.50 10.61 151.47
|
||||
CQUAD 19 13 111 112 114 113 0.045 1
|
||||
$COMMENT123456781234567812345678123456781234567812345678123456781234567812345678
|
||||
$NAME 7 106 Stringer 6
|
||||
SECTION 7 106 1 1
|
||||
GRID 115 -373.75 -12.78 160.63
|
||||
GRID 116 -373.75 -14.11 160.05
|
||||
GRID 117 -512.50 -9.22 152.04
|
||||
GRID 118 -512.50 -10.61 151.47
|
||||
CQUAD 20 13 115 116 118 117 0.045 1
|
||||
$COMMENT123456781234567812345678123456781234567812345678123456781234567812345678
|
||||
$NAME 7 107 Stringer 7
|
||||
SECTION 7 107 1 1
|
||||
GRID 119 -373.75 19.11 157.41
|
||||
GRID 120 -373.75 20.36 156.57
|
||||
GRID 121 -512.50 13.95 149.68
|
||||
GRID 122 -512.50 15.20 148.85
|
||||
CQUAD 21 13 119 120 122 121 0.045 1
|
||||
$COMMENT123456781234567812345678123456781234567812345678123456781234567812345678
|
||||
$NAME 7 108 Stringer 8
|
||||
SECTION 7 108 1 1
|
||||
GRID 123 -373.75 -19.12 157.41
|
||||
GRID 124 -373.75 -20.36 156.57
|
||||
GRID 125 -512.50 -13.95 149.68
|
||||
GRID 126 -512.50 -15.20 148.85
|
||||
CQUAD 22 13 123 124 126 125 0.045 1
|
||||
$COMMENT123456781234567812345678123456781234567812345678123456781234567812345678
|
||||
$NAME 7 109 Stringer 9
|
||||
SECTION 7 109 1 1
|
||||
GRID 127 -373.75 24.70 153.01
|
||||
GRID 128 -373.75 25.76 151.95
|
||||
GRID 129 -512.50 18.13 146.44
|
||||
GRID 130 -512.50 19.19 145.38
|
||||
CQUAD 23 13 127 128 130 129 0.045 1
|
||||
$COMMENT123456781234567812345678123456781234567812345678123456781234567812345678
|
||||
$NAME 7 110 Stringer 10
|
||||
SECTION 7 110 1 1
|
||||
GRID 131 -373.75 -24.70 153.01
|
||||
GRID 132 -373.75 -25.76 151.95
|
||||
GRID 133 -512.75 -18.13 146.44
|
||||
GRID 134 -512.75 -19.19 145.38
|
||||
CQUAD 24 13 131 132 134 133 0.045 1
|
||||
$COMMENT123456781234567812345678123456781234567812345678123456781234567812345678
|
||||
$NAME 7 111 Stringer 11
|
||||
SECTION 7 111 1 1
|
||||
GRID 135 -373.75 29.32 147.61
|
||||
GRID 136 -373.75 30.16 146.37
|
||||
GRID 137 -512.50 21.60 142.45
|
||||
GRID 138 -512.50 22.43 141.20
|
||||
CQUAD 25 13 135 136 138 137 0.045 1
|
||||
$COMMENT123456781234567812345678123456781234567812345678123456781234567812345678
|
||||
$NAME 7 112 Stringer 12
|
||||
SECTION 7 112 1 1
|
||||
GRID 139 -373.75 -29.32 147.61
|
||||
GRID 140 -373.75 -30.16 146.37
|
||||
GRID 141 -512.50 -21.60 142.45
|
||||
GRID 142 -512.50 -22.43 141.20
|
||||
CQUAD 26 13 139 140 142 141 0.045 1
|
||||
$COMMENT123456781234567812345678123456781234567812345678123456781234567812345678
|
||||
$NAME 7 113 Stringer 13
|
||||
SECTION 7 113 1 1
|
||||
GRID 143 -373.75 32.80 141.41
|
||||
GRID 144 -373.75 33.38 140.03
|
||||
GRID 145 -512.50 24.22 137.86
|
||||
GRID 146 -512.50 24.79 136.47
|
||||
CQUAD 27 13 143 144 146 145 0.045 1
|
||||
$COMMENT123456781234567812345678123456781234567812345678123456781234567812345678
|
||||
$NAME 7 114 Stringer 14
|
||||
SECTION 7 114 1 1
|
||||
GRID 147 -373.75 -32.80 141.41
|
||||
GRID 148 -373.75 -33.38 140.03
|
||||
GRID 149 -512.50 -24.22 137.86
|
||||
GRID 150 -512.50 -24.80 136.47
|
||||
CQUAD 28 13 147 148 150 149 0.045 1
|
||||
$COMMENT123456781234567812345678123456781234567812345678123456781234567812345678
|
||||
$NAME 7 115 Stringer 15
|
||||
SECTION 7 115 1 1
|
||||
GRID 151 -373.75 35.01 134.66
|
||||
GRID 152 -373.75 35.30 133.19
|
||||
GRID 153 -512.50 25.90 132.85
|
||||
GRID 154 -512.50 26.19 131.37
|
||||
CQUAD 29 13 151 152 154 153 0.045 1
|
||||
$COMMENT123456781234567812345678123456781234567812345678123456781234567812345678
|
||||
$NAME 7 116 Stringer 16
|
||||
SECTION 7 116 1 1
|
||||
GRID 155 -373.75 -35.01 134.66
|
||||
GRID 156 -373.75 -35.30 133.19
|
||||
GRID 157 -512.50 -25.90 132.85
|
||||
GRID 158 -512.50 -26.19 131.37
|
||||
CQUAD 30 13 155 156 158 157 0.045 1
|
||||
$COMMENT123456781234567812345678123456781234567812345678123456781234567812345678
|
||||
$NAME 7 117 Stringer 17
|
||||
SECTION 7 117 1 1
|
||||
GRID 159 -373.75 35.85 127.60
|
||||
GRID 160 -373.75 35.85 126.10
|
||||
GRID 161 -512.50 26.56 127.60
|
||||
GRID 162 -512.50 26.56 126.10
|
||||
CQUAD 31 13 159 160 162 161 0.045 1
|
||||
$COMMENT123456781234567812345678123456781234567812345678123456781234567812345678
|
||||
$NAME 7 118 Stringer 18
|
||||
SECTION 7 118 1 1
|
||||
GRID 163 -373.75 -35.85 127.60
|
||||
GRID 164 -373.75 -35.85 126.10
|
||||
GRID 165 -512.50 -26.56 127.60
|
||||
GRID 166 -512.50 -26.56 126.10
|
||||
CQUAD 32 13 163 164 166 165 0.045 1
|
||||
$COMMENT123456781234567812345678123456781234567812345678123456781234567812345678
|
||||
$NAME 7 119 Stringer 19
|
||||
SECTION 7 119 1 1
|
||||
GRID 167 -373.75 35.30 121.31
|
||||
GRID 168 -373.75 35.01 119.84
|
||||
GRID 169 -512.50 26.19 123.13
|
||||
GRID 170 -512.50 25.90 121.65
|
||||
CQUAD 33 13 167 168 170 169 0.045 1
|
||||
$COMMENT123456781234567812345678123456781234567812345678123456781234567812345678
|
||||
$NAME 7 120 Stringer 20
|
||||
SECTION 7 120 1 1
|
||||
GRID 171 -373.75 -35.30 121.31
|
||||
GRID 172 -373.75 -35.01 119.84
|
||||
GRID 173 -512.50 -26.19 123.13
|
||||
GRID 174 -512.50 -25.90 121.65
|
||||
CQUAD 34 13 171 172 174 173 0.045 1
|
||||
$COMMENT123456781234567812345678123456781234567812345678123456781234567812345678
|
||||
$NAME 7 121 Stringer 21
|
||||
SECTION 7 121 1 1
|
||||
GRID 171 -373.75 -35.30 121.31
|
||||
GRID 172 -373.75 -35.01 119.84
|
||||
GRID 173 -512.50 -26.19 123.13
|
||||
GRID 174 -512.50 -25.90 121.65
|
||||
CQUAD 34 13 171 172 174 173 0.045 1
|
||||
$COMMENT123456781234567812345678123456781234567812345678123456781234567812345678
|
||||
$NAME 7 122 Stringer 22
|
||||
SECTION 7 122 1 1
|
||||
GRID 175 -373.75 33.38 114.47
|
||||
GRID 176 -373.75 32.80 113.08
|
||||
GRID 177 -512.50 24.79 118.03
|
||||
GRID 178 -512.50 24.22 116.64
|
||||
CQUAD 35 13 175 176 178 177 0.045 1
|
||||
$COMMENT123456781234567812345678123456781234567812345678123456781234567812345678
|
||||
$NAME 7 123 Stringer 23
|
||||
SECTION 7 123 1 1
|
||||
GRID 179 -373.75 -33.38 114.47
|
||||
GRID 180 -373.75 -32.80 113.08
|
||||
GRID 181 -512.50 -24.80 118.03
|
||||
GRID 182 -512.50 -24.22 116.64
|
||||
CQUAD 36 13 179 180 182 181 0.045 1
|
||||
$COMMENT123456781234567812345678123456781234567812345678123456781234567812345678
|
||||
$NAME 7 124 Stringer 24
|
||||
SECTION 7 124 1 1
|
||||
GRID 183 -373.75 30.16 108.14
|
||||
GRID 184 -373.75 29.32 106.89
|
||||
GRID 185 -512.50 22.43 113.30
|
||||
GRID 186 -512.50 21.60 112.05
|
||||
CQUAD 37 13 183 184 186 185 0.045 1
|
||||
$COMMENT123456781234567812345678123456781234567812345678123456781234567812345678
|
||||
$NAME 7 125 Stringer 25
|
||||
SECTION 7 125 1 1
|
||||
GRID 187 -373.75 -30.16 108.14
|
||||
GRID 188 -373.75 -29.32 106.89
|
||||
GRID 189 -512.50 -22.43 113.30
|
||||
GRID 190 -512.50 -21.60 112.05
|
||||
CQUAD 38 13 187 188 190 189 0.045 1
|
||||
$COMMENT123456781234567812345678123456781234567812345678123456781234567812345678
|
||||
$NAME 7 126 Stringer 26
|
||||
SECTION 7 126 1 1
|
||||
GRID 191 -373.75 25.76 102.55
|
||||
GRID 192 -373.75 24.70 101.49
|
||||
GRID 193 -512.50 19.19 109.12
|
||||
GRID 194 -512.50 18.13 108.06
|
||||
CQUAD 39 13 191 192 194 193 0.045 1
|
||||
$COMMENT123456781234567812345678123456781234567812345678123456781234567812345678
|
||||
$NAME 7 127 Stringer 27
|
||||
SECTION 7 127 1 1
|
||||
GRID 195 -373.75 -25.76 102.55
|
||||
GRID 196 -373.75 -24.70 101.49
|
||||
GRID 197 -512.50 -19.19 109.12
|
||||
GRID 198 -512.50 -18.13 108.06
|
||||
CQUAD 40 13 195 196 198 197 0.045 1
|
||||
$COMMENT123456781234567812345678123456781234567812345678123456781234567812345678
|
||||
$NAME 7 128 Stringer 28
|
||||
SECTION 7 128 1 1
|
||||
GRID 199 -373.75 20.36 97.93
|
||||
GRID 200 -373.75 19.11 97.09
|
||||
GRID 201 -512.50 15.20 105.65
|
||||
GRID 202 -512.50 13.95 104.82
|
||||
CQUAD 41 13 199 200 202 201 0.045 1
|
||||
$COMMENT123456781234567812345678123456781234567812345678123456781234567812345678
|
||||
$NAME 7 129 Stringer 29
|
||||
SECTION 7 129 1 1
|
||||
GRID 203 -373.75 -20.36 97.93
|
||||
GRID 204 -373.75 -19.12 97.09
|
||||
GRID 205 -512.50 -15.20 105.65
|
||||
GRID 206 -512.50 -13.95 104.82
|
||||
CQUAD 42 13 203 204 206 205 0.045 1
|
||||
$COMMENT123456781234567812345678123456781234567812345678123456781234567812345678
|
||||
$NAME 7 130 Stringer 30
|
||||
SECTION 7 130 1 1
|
||||
GRID 207 -373.75 14.16 94.45
|
||||
GRID 208 -373.75 12.78 93.87
|
||||
GRID 209 -512.50 10.61 103.03
|
||||
GRID 210 -512.50 9.22 102.46
|
||||
CQUAD 43 13 207 208 210 209 0.045 1
|
||||
$COMMENT123456781234567812345678123456781234567812345678123456781234567812345678
|
||||
$NAME 7 131 Stringer 31
|
||||
SECTION 7 131 1 1
|
||||
GRID 211 -373.75 -14.17 94.45
|
||||
GRID 212 -373.75 -12.78 93.87
|
||||
GRID 213 -512.50 -10.61 103.03
|
||||
GRID 214 -512.50 -9.22 102.46
|
||||
CQUAD 44 13 211 212 214 213 0.045 1
|
||||
$COMMENT123456781234567812345678123456781234567812345678123456781234567812345678
|
||||
$NAME 7 132 Stringer 32
|
||||
SECTION 7 132 1 1
|
||||
GRID 215 -373.75 7.41 92.24
|
||||
GRID 216 -373.75 5.94 91.95
|
||||
GRID 217 -512.50 5.59 101.35
|
||||
GRID 218 -512.50 4.13 101.06
|
||||
CQUAD 45 13 215 216 218 217 0.045 1
|
||||
$COMMENT123456781234567812345678123456781234567812345678123456781234567812345678
|
||||
$NAME 7 133 Stringer 33
|
||||
SECTION 7 133 1 1
|
||||
GRID 219 -373.75 -7.41 92.24
|
||||
GRID 220 -373.75 -5.94 91.95
|
||||
GRID 221 -512.50 -5.59 101.35
|
||||
GRID 222 -512.50 -4.13 101.06
|
||||
CQUAD 46 13 219 220 222 221 0.045 1
|
||||
$COMMENT123456781234567812345678123456781234567812345678123456781234567812345678
|
||||
$NAME 7 201 Fairing Structure 1
|
||||
SECTION 7 201 1 1
|
||||
GRID 228 -389.50 29.69 78.52
|
||||
GRID 229 -389.50 -29.69 78.52
|
||||
GRID 230 -389.50 29.69 108.35
|
||||
GRID 231 -389.50 -29.69 108.35
|
||||
CQUAD 11 8 228 229 231 230 0.032 1
|
||||
$COMMENT123456781234567812345678123456781234567812345678123456781234567812345678
|
||||
$NAME 7 202 Fairing Structure 2
|
||||
SECTION 7 202 1 1
|
||||
GRID 232 -405.50 25.83 81.35
|
||||
GRID 233 -405.50 -25.83 81.35
|
||||
GRID 234 -405.50 25.83 104.95
|
||||
GRID 235 -405.50 -25.83 104.95
|
||||
CQUAD 12 8 232 233 235 234 0.032 1
|
||||
$COMMENT123456781234567812345678123456781234567812345678123456781234567812345678
|
||||
$NAME 7 203 Fairing Structure 3
|
||||
SECTION 7 203 1 1
|
||||
GRID 236 -423.00 21.61 84.44
|
||||
GRID 237 -423.00 -21.61 84.44
|
||||
GRID 238 -423.00 21.61 102.37
|
||||
GRID 239 -423.00 -21.61 102.37
|
||||
CQUAD 13 8 236 237 239 238 0.032 1
|
||||
$COMMENT123456781234567812345678123456781234567812345678123456781234567812345678
|
||||
$NAME 7 204 Fairing Structure 4
|
||||
SECTION 7 204 1 1
|
||||
GRID 240 -442.50 16.90 87.89
|
||||
GRID 241 -442.50 -16.90 87.89
|
||||
GRID 242 -442.50 16.90 100.49
|
||||
GRID 243 -442.50 -16.90 100.49
|
||||
CQUAD 14 8 240 241 243 242 0.032 1
|
||||
$COMMENT123456781234567812345678123456781234567812345678123456781234567812345678
|
||||
$NAME 7 205 Fairing Structure 5
|
||||
SECTION 7 205 1 1
|
||||
GRID 244 -461.50 12.31 91.25
|
||||
GRID 245 -461.50 -12.31 91.25
|
||||
GRID 246 -461.50 12.31 99.48
|
||||
GRID 247 -461.50 -12.31 99.48
|
||||
CQUAD 15 8 244 245 247 246 0.032 1
|
||||
$COMMENT123456781234567812345678123456781234567812345678123456781234567812345678
|
||||
$NAME 7 206 Fairing Structure 6
|
||||
SECTION 7 206 1 1
|
||||
GRID 248 -479.50 7.97 94.43
|
||||
GRID 249 -479.50 -7.97 94.43
|
||||
GRID 250 -479.50 7.97 99.19
|
||||
GRID 251 -479.50 -7.97 99.19
|
||||
CQUAD 16 8 248 249 251 250 0.032 1
|
||||
$COMMENT123456781234567812345678123456781234567812345678123456781234567812345678
|
||||
$NAME 7 207 Fairing Structure 7
|
||||
SECTION 7 207 1 1
|
||||
GRID 252 -496.50 3.86 97.44
|
||||
GRID 253 -496.50 -3.86 97.44
|
||||
GRID 254 -496.50 3.86 99.49
|
||||
GRID 255 -496.50 -3.86 99.49
|
||||
CQUAD 17 8 252 253 255 254 0.032 1
|
||||
$COMMENT123456781234567812345678123456781234567812345678123456781234567812345678
|
||||
$NAME 7 501 Pressure Bulkhead
|
||||
SECTION 7 501 2
|
||||
GRID 330 -373.25 -0.00 127.25
|
||||
GRID 331 -373.75 -0.00 127.25
|
||||
CCONE2 18 8 330 331 36.25C106
|
||||
C106 36.25 0 0
|
||||
$COMMENT123456781234567812345678123456781234567812345678123456781234567812345678
|
||||
ENDDATA
|
||||
@@ -1,18 +0,0 @@
|
||||
set(FAA_SAMPLE_MODELS Business_Jet.fg4 Generic_Twin.fg4)
|
||||
|
||||
foreach(faa_input ${FAA_SAMPLE_MODELS})
|
||||
g_target(${faa_input} "BRL-CAD Geometry Models/Sample")
|
||||
endforeach(faa_input ${FAA_SAMPLE_MODELS})
|
||||
|
||||
cmakefiles(
|
||||
${FAA_SAMPLE_MODELS}
|
||||
CMakeLists.txt
|
||||
README
|
||||
)
|
||||
|
||||
# Local Variables:
|
||||
# tab-width: 8
|
||||
# mode: cmake
|
||||
# indent-tabs-mode: t
|
||||
# End:
|
||||
# ex: shiftwidth=2 tabstop=8
|
||||
-209836
File diff suppressed because it is too large
Load Diff
@@ -1,13 +0,0 @@
|
||||
For example images of these models, see the report:
|
||||
|
||||
Uncontained Engine Debris Analysis Using the Uncontained
|
||||
Engine Debris Damage Assessment Model
|
||||
DOT/FAA/AR-04/16
|
||||
Office of Aviation Research
|
||||
Washington, D.C. 20591
|
||||
http://www.tc.faa.gov/its/worldpac/techrpt/AR04-16.pdf
|
||||
|
||||
(Note: the Generic Twin images in that report show the model
|
||||
prior to its most recent updates, which are reflected in the
|
||||
version included in BRL-CAD.)
|
||||
|
||||
-78680
File diff suppressed because it is too large
Load Diff
+11817
-3473
File diff suppressed because one or more lines are too long
@@ -1,40 +0,0 @@
|
||||
set(
|
||||
NIST_SAMPLE_MODELS
|
||||
NIST_MBE_PMI_1.stp
|
||||
NIST_MBE_PMI_2.stp
|
||||
NIST_MBE_PMI_3.stp
|
||||
NIST_MBE_PMI_4.stp
|
||||
NIST_MBE_PMI_5.stp
|
||||
NIST_MBE_PMI_6.stp
|
||||
NIST_MBE_PMI_7-10.3dm
|
||||
NIST_MBE_PMI_11.stp
|
||||
)
|
||||
|
||||
foreach(im ${NIST_SAMPLE_MODELS})
|
||||
g_target(${im} "BRL-CAD Geometry Models/Sample")
|
||||
endforeach(im ${NIST_SAMPLE_MODELS})
|
||||
|
||||
cmakefiles(
|
||||
${NIST_SAMPLE_MODELS}
|
||||
CMakeLists.txt
|
||||
README
|
||||
pdf/1.pdf
|
||||
pdf/2.pdf
|
||||
pdf/3.pdf
|
||||
pdf/4.pdf
|
||||
pdf/5.pdf
|
||||
pdf/6.pdf
|
||||
pdf/7-10_assem.pdf
|
||||
pdf/7.pdf
|
||||
pdf/8.pdf
|
||||
pdf/9.pdf
|
||||
pdf/10.pdf
|
||||
pdf/11.pdf
|
||||
)
|
||||
|
||||
# Local Variables:
|
||||
# tab-width: 8
|
||||
# mode: cmake
|
||||
# indent-tabs-mode: t
|
||||
# End:
|
||||
# ex: shiftwidth=2 tabstop=8
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Binary file not shown.
@@ -1,37 +0,0 @@
|
||||
December 2014:
|
||||
|
||||
The files in this directory are conversions of the NIST MBE PMI test models
|
||||
into the AP203 file format. These conversions are also in the public domain.
|
||||
|
||||
Originals are from http://www.nist.gov/el/msid/infotest/mbe-pmi-validation.cfm
|
||||
|
||||
Models 7 through 10 have been assembled into a single file, guided by the example
|
||||
PDF provided with the original NIST data set.
|
||||
|
||||
MBE PMI Validation and Conformance Testing Models
|
||||
|
||||
NIST has created a Test System to measure conformance of Computer-Aided Design
|
||||
(CAD) to American Society of Mechanical Engineers (ASME) standards for Product
|
||||
and Manufacturing Information (PMI), specifically geometric dimensioning and
|
||||
tolerancing (GD&T) information.
|
||||
|
||||
As part of this Test System, CAD Models were prepared.
|
||||
|
||||
For problems or questions about the MBE PMI CAD Models, contact: Robert Lipman
|
||||
|
||||
Dataset 1 First Release: December 2013
|
||||
Dataset 1 Update Release: December 2014 (Note: Dataset 1 files currently in
|
||||
BRL-CAD repo are based off of the
|
||||
2013 version.)
|
||||
Dataset 2 First Release: June 2015
|
||||
|
||||
These files were developed at the National Institute of Standards and
|
||||
Technology by employees of the Federal Government in the course of their
|
||||
official duties. Pursuant to Title 17 Section 105 of the United States Code
|
||||
these files are not subject to copyright protection and are in the public
|
||||
domain. These files are an experimental system. NIST assumes no responsibility
|
||||
whatsoever for their use by other parties, and makes no guarantees, expressed
|
||||
or implied, about their quality, reliability, or any other characteristic.
|
||||
|
||||
Any mention of commercial products is for information only; it does not imply
|
||||
recommendation or endorsement by NIST.
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -1,27 +0,0 @@
|
||||
title {Photo holder by csanyi_pal}
|
||||
units mm
|
||||
put {keretgyurf.s} eto V {0 0 175} N {0 0 0.9866229999999999167314968} C {0 0 4.933115000000001693081231} r 156 r_d 2.959869000000000749395213
|
||||
put {keretgyura.s} eto V {0 0 25} N {0 0 0.9863332009625119800588777} C {0 0 4.931666004812560011316691} r 156 r_d 2.95899960288753804960038
|
||||
put {kartonekhk.s} tgc V {0 0 20} H {0 0 160} A {0 -162 0} B {162 0 0} C {0 -162 0} D {162 0 0}
|
||||
put {kartonekhb.s} tgc V {0 0 20} H {0 0 160} A {0 -161 0} B {161 0 0} C {0 -161 0} D {161 0 0}
|
||||
put {uvegszelo.s} arb8 V1 {0 0 0} V2 {-273.2568000000004531102604 -199.463712010076335445774 0} V3 {-273.2568000000004531102604 -199.4637120100763070240646 200} V4 {-2.137306219959771470627159E-14 1.560125977964318386935442E-14 199.9999999999999715782906} V5 {-273.2568000000009078576113 199.4637120100766765062872 0} V6 {-273.2568000000009078576113 199.4637120100766765062872 0} V7 {-273.2568000000009078576113 199.4637120100766765062872 200.0000000000001705302566} V8 {-273.2568000000009078576113 199.4637120100766765062872 200.0000000000001705302566}
|
||||
put {kereteehj.s} tgc V {-144.7437920000004965004337 58.16567399999996013093551 20} H {0 0 160} A {1.791839747726502229951961 4.667902132486008603962091 0} B {-2.800741279491604895923729 1.075103848635900805064125 0} C {1.791839747726502229951961 4.667902132486008603962091 0} D {-2.800741279491604895923729 1.075103848635900805064125 0}
|
||||
put {kereteehb.s} tgc V {-144.6299540000000831696525 -58.43016799999981714108799 20} H {0 0 160} A {1.873032967079560906498159 -4.635919272833937121447434 0} B {2.781551563700361828779251 1.123819780247735433675871 0} C {1.873032967079560906498159 -4.635919272833937121447434 0} D {2.781551563700361828779251 1.123819780247735433675871 0}
|
||||
put {kereteehjkicsi.s} tgc V {-144.736713000000236206688 58.16567399999982512781571 25} H {0 0 150} A {1.791839747726502229951961 4.667902132486008603962091 0} B {-2.800741279491604895923729 1.075103848635900805064125 0} C {1.791839747726502229951961 4.667902132486008603962091 0} D {-2.800741279491604895923729 1.075103848635900805064125 0}
|
||||
put {keptarto.c} comb region no tree {u {u {l uveglap.r} {l karton.r}} {l keret.r}}
|
||||
put {kereteehbkicsi.s} tgc V {-144.6299510000000339005055 -58.43016799999985266822478 25.00000000000002842170943} H {0 0 150} A {1.873032967079560906498159 -4.635919272833937121447434 0} B {2.781551563700361828779251 1.123819780247735433675871 0} C {1.873032967079560906498159 -4.635919272833937121447434 0} D {2.781551563700361828779251 1.123819780247735433675871 0}
|
||||
put {uvegekhk.s} tgc V {0 0 0} H {0 0 200} A {0 -160 0} B {160 0 0} C {0 -160 0} D {160 0 0}
|
||||
put {uvegekhb.s} tgc V {0 0 0} H {0 0 200} A {0 -156 0} B {156 0 0} C {0 -156 0} D {156 0 0}
|
||||
put {uveglap.r} comb region yes tree {n {- {l uvegekhk.s} {l uvegekhb.s}} {l uvegszelo.s}}
|
||||
attr set {uveglap.r} {color} {254/240/254} {shader} {glass} {region} {R} {region_id} {1000} {material_id} {1} {los} {100}
|
||||
put {kartonkozepenlyuk.s} ell V {-161.3665119999998296407284 9.880522794467734402637521E-15 100.0809629999999117444531} A {7.347638122934263549268508E-16 12 0} B {-12 7.347638122934263549268508E-16 0} C {0 0 12}
|
||||
put {karton.r} comb region yes tree {u {- {- {- {- {n {- {l kartonekhk.s} {l kartonekhb.s}} {l kartonszelok.s}} {l kartongmbab.s}} {l kartongmbaj.s}} {l kartongmbfk.s}} {l kartonkozepenlyuk.s}} {- {- {- {n {- {l kartonekhb.s} {l uvegekhk.s}} {l kartonszelok.s}} {l kartonszelob.s}} {l kartongmbab.s}} {l kartongmbaj.s}}}
|
||||
attr set {karton.r} {color} {255/255/255} {shader} {plastic} {region} {R} {region_id} {1003} {material_id} {1} {los} {100}
|
||||
put {keretszelokozepen.s} arb8 V1 {0 0 0} V2 {-166.3083958664467161270295 -67.15610201701679216057528 0} V3 {-166.3083958664467161270295 -67.15610201701677794972056 214.8175999999999135070539} V4 {-1.578905978938171909047631E-16 1.426081241349886421227616E-14 214.8175999999999419287633} V5 {-166.659954164212450677951 67.12896928889989567323937 0} V6 {-166.659954164212450677951 67.12896928889989567323937 0} V7 {-166.659954164212450677951 67.12896928889990988409409 214.8175999999999987721822} V8 {-166.659954164212450677951 67.12896928889990988409409 214.8175999999999987721822}
|
||||
put {keret.r} comb region yes tree {- {u {u {u {u {u {u {u {u {u {n {l keretgyura.s} {l kereteehb.s}} {l kereteehbkicsi.s}} {n {l keretgyura.s} {l kereteehj.s}}} {l kereteehjkicsi.s}} {n {l keretgyurf.s} {l kereteehb.s}}} {l kereteehbkicsi.s}} {n {l keretgyurf.s} {l kereteehj.s}}} {l kereteehjkicsi.s}} {n {l keretgyura.s} {l keretszelokozepen.s}}} {- {n {l keretgyurf.s} {l keretszelokozepen.s}} {l uveglap.r}}} {l uveglap.r}}
|
||||
attr set {keret.r} {color} {255/240/120} {shader} {plastic} {region} {R} {region_id} {1001} {material_id} {1} {los} {100}
|
||||
put {kartonszelok.s} arb8 V1 {0 0 0} V2 {-168.0589500000000384716259 -71.77879269107120308035519 0} V3 {-168.0589500000000384716259 -71.77879269107113202608161 224.0785999999999660303729} V4 {-1.631395896368632521173223E-29 1.592174214692930869044001E-14 224.0786000000000228737917} V5 {-168.0589500000001237367542 71.77879269107125992377405 0} V6 {-168.0589500000001237367542 71.77879269107125992377405 0} V7 {-168.0589500000001237367542 71.77879269107127413462877 224.0786000000000797172106} V8 {-168.0589500000001237367542 71.77879269107127413462877 224.0786000000000797172106}
|
||||
put {kartonszelob.s} arb8 V1 {0 0 0} V2 {-166.4836399999998661769496 -63.37119199999997221084413 0} V3 {-166.4836399999998661769496 -63.37119199999995799998942 214.8175999999999135070539} V4 {-1.757644366536248560321584E-29 1.526370851934186986541124E-14 214.8175999999999419287633} V5 {-166.4836399999998661769496 63.37119199999997221084413 0} V6 {-166.4836399999998661769496 63.37119199999997221084413 0} V7 {-166.4836399999998661769496 63.37119199999999352712621 214.8175999999999987721822} V8 {-166.4836399999998661769496 63.37119199999999352712621 214.8175999999999987721822}
|
||||
put {kartongmbfk.s} ell V {-161.2951809999994736699591 9.876155174676486577133334E-15 180.0822759999995525959093} A {7.347638122934263549268508E-16 12 0} B {-12 7.347638122934263549268508E-16 0} C {0 0 12}
|
||||
put {kartongmbaj.s} ell V {-148.5169369999997002196324 -63.37174099999977983088684 19.92848799999995890175342} A {7.347638122934263549268508E-16 12 0} B {-12 7.347638122934263549268508E-16 0} C {0 0 12}
|
||||
put {kartongmbab.s} ell V {-147.9239789999987806368154 63.24422300000000518593879 20.08229800000001219473234} A {7.347638122934263549268508E-16 12 0} B {-12 7.347638122934263549268508E-16 0} C {0 0 12}
|
||||
+63
-25513
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1,36 +0,0 @@
|
||||
title {Sample geometry with a radial gridlines and a shadow-casting light}
|
||||
units m
|
||||
put {cylinder.r} comb region yes tree {- {- {- {- {- {l c1.tgc} {l c1i.tgc}} {l c1c1.arb8}} {l c1c2.arb8}} {l c1c3.tgc}} {l c1c4.tgc}}
|
||||
attr set {cylinder.r} {region} {R} {region_id} {1003} {material_id} {1} {los} {100}
|
||||
put {50m_ring.s} tor V {0 0 0} H {6.12323399573676603586882E-17 0 -1} r_a 50000 r_h 100
|
||||
put {40m_ring.s} tor V {0 0 0} H {6.12323399573676603586882E-17 0 -1} r_a 40000 r_h 100
|
||||
put {30m_ring.s} tor V {0 0 0} H {6.12323399573676603586882E-17 0 -1} r_a 30000 r_h 100
|
||||
put {20m_ring.s} tor V {0 0 0} H {6.12323399573676603586882E-17 0 -1} r_a 20000 r_h 100
|
||||
put {10m_ring.s} tor V {0 0 0} H {6.12323399573676603586882E-17 0 -1} r_a 10000 r_h 100
|
||||
put {c1c2.arb8} arb8 V1 {-1449.999999999999545252649 -99.99999999999998578914528 0} V2 {-1449.999999999999545252649 100 0} V3 {-1449.999999999999545252649 100 1900} V4 {-1449.999999999999545252649 -99.99999999999998578914528 1900} V5 {-449.9999999999999431565811 -99.99999999999998578914528 0} V6 {-449.9999999999999431565811 100 0} V7 {-449.9999999999999431565811 100 1900} V8 {-449.9999999999999431565811 -99.99999999999998578914528 1900}
|
||||
put {c1c1.arb8} arb8 V1 {1450 -500 1250} V2 {1450 500 1250} V3 {1450 500 1750} V4 {1450 -500 1750} V5 {450 -500 1250} V6 {450 500 1250} V7 {450 500 1750} V8 {450 -500 1750}
|
||||
put {ground.s} arb8 V1 {60000.00000000002182787284 -60000.00000000002182787284 -100} V2 {60000.00000000002182787284 60000.00000000002182787284 -100} V3 {60000.00000000002182787284 60000.00000000002182787284 0} V4 {60000.00000000002182787284 -60000.00000000002182787284 0} V5 {-60000.00000000001455191523 -60000.00000000002182787284 -100} V6 {-60000.00000000001455191523 60000.00000000002182787284 -100} V7 {-60000.00000000001455191523 60000.00000000002182787284 0} V8 {-60000.00000000001455191523 -60000.00000000002182787284 0}
|
||||
put {ground.r} comb region yes tree {l ground.s}
|
||||
attr set {ground.r} {region} {R} {region_id} {1000} {material_id} {1} {los} {100} {color} {0/255/0}
|
||||
put {c1c4.tgc} tgc V {-6.123233995736766242944808E-14 -500 1000} H {0 -1000 6.123233995736767505122256E-14} A {200 0 0} B {0 1.224646799147353374806706E-14 -200} C {200 0 0} D {0 1.224646799147353374806706E-14 -200}
|
||||
put {c1c3.tgc} tgc V {0 500 1500} H {0 1000 6.123233995736764980767359E-14} A {200 0 0} B {0 1.224646799147353374806706E-14 -200} C {200 0 0} D {0 1.224646799147353374806706E-14 -200}
|
||||
put {165deg.s} tgc V {53125.92044589875149540603 -14235.04748063865554286167 0} H {-106251.8408917975175427273 28470.09496127731472370215 6.735557395310443447840915E-12} A {-5.91458985689334876413324E-15 1.584809575715884060677382E-15 -100} B {-25.88190451025210236934981 -96.59258262890682544821175 0} C {-5.91458985689334876413324E-15 1.584809575715884060677382E-15 -100} D {-25.88190451025210236934981 -96.59258262890682544821175 0}
|
||||
put {135deg.s} tgc V {38890.87296526011050445959 -38890.8729652601177804172 0} H {-77781.74593052023556083441 77781.74593052025011274964 6.735557395310443447840915E-12} A {-4.329780281177466281177668E-15 4.329780281177467070038573E-15 -100} B {-70.71067811865475505328504 -70.71067811865474084243033 0} C {-4.329780281177466281177668E-15 4.329780281177467070038573E-15 -100} D {-70.71067811865475505328504 -70.71067811865474084243033 0}
|
||||
put {105deg.s} tgc V {14235.04748063864644791465 -53125.92044589875877136365 0} H {-28470.09496127729653380811 106251.8408917975320946425 6.735557395310443447840915E-12} A {-1.58480957571588307460125E-15 5.914589856893349552994145E-15 -100} B {-96.59258262890682544821175 -25.88190451025208460578142 0} C {-1.58480957571588307460125E-15 5.914589856893349552994145E-15 -100} D {-96.59258262890682544821175 -25.88190451025208460578142 0}
|
||||
put {150deg.s} tgc V {47631.39720814413158223033 -27499.99999999999636202119 0} H {-95262.79441628826316446066 55000 6.735557395310443447840915E-12} A {-5.302876193624534820650073E-15 3.061616997868382648155861E-15 -100} B {-49.99999999999999289457264 -86.60254037844387653422018 0} C {-5.302876193624534820650073E-15 3.061616997868382648155861E-15 -100} D {-49.99999999999999289457264 -86.60254037844387653422018 0}
|
||||
put {120deg.s} tgc V {27499.99999999998908606358 -47631.39720814413158223033 0} H {-54999.99999999998544808477 95262.79441628826316446066 6.735557395310443447840915E-12} A {-3.061616997868381859294956E-15 5.302876193624534820650073E-15 -100} B {-86.60254037844387653422018 -49.99999999999997868371793 0} C {-3.061616997868381859294956E-15 5.302876193624534820650073E-15 -100} D {-86.60254037844387653422018 -49.99999999999997868371793 0}
|
||||
put {light.s} ell V {0 0 1500} A {10 0 0} B {0 10 0} C {0 0 10}
|
||||
put {light.r} comb region yes tree {l light.s}
|
||||
attr set {light.r} {oshader} {light {f 10 s 32 v 0}} {region} {R} {shader} {light {f 10.0 s 32 v 0}} {region_id} {1002} {material_id} {1} {los} {100} {color} {255/255/255}
|
||||
put {c1i.tgc} tgc V {0 0 0} H {0 0 1900} A {900 0 0} B {0 900 0} C {900 0 0} D {0 900 0}
|
||||
put {75deg.s} tgc V {-14235.04748063864099094644 -53125.92044589875877136365 0} H {28470.09496127728561987169 106251.8408917975320946425 6.735557395310443447840915E-12} A {1.584809575715882482955572E-15 5.914589856893349552994145E-15 -100} B {-96.59258262890682544821175 25.88190451025207394764038 0} C {1.584809575715882482955572E-15 5.914589856893349552994145E-15 -100} D {-96.59258262890682544821175 25.88190451025207394764038 0}
|
||||
put {45deg.s} tgc V {-38890.8729652601177804172 -38890.8729652601177804172 0} H {77781.74593052025011274964 77781.74593052025011274964 6.735557395310443447840915E-12} A {4.329780281177467070038573E-15 4.329780281177467070038573E-15 -100} B {-70.71067811865475505328504 70.71067811865475505328504 0} C {4.329780281177467070038573E-15 4.329780281177467070038573E-15 -100} D {-70.71067811865475505328504 70.71067811865475505328504 0}
|
||||
put {15deg.s} tgc V {-53125.92044589875877136365 -14235.04748063864099094644 0} H {106251.8408917975320946425 28470.09496127728561987169 6.735557395310443447840915E-12} A {5.914589856893349552994145E-15 1.584809575715882482955572E-15 -100} B {-25.88190451025207394764038 96.59258262890682544821175 0} C {5.914589856893349552994145E-15 1.584809575715882482955572E-15 -100} D {-25.88190451025207394764038 96.59258262890682544821175 0}
|
||||
put {90deg.s} tgc V {-3.367778697655221320023674E-12 -55000 0} H {6.735557395310443447840915E-12 110000.0000000000145519152 6.735557395310443447840915E-12} A {3.749399456654643800636173E-31 6.123233995736766085172627E-15 -100} B {-100 6.123233995736766085172627E-15 0} C {3.749399456654643800636173E-31 6.123233995736766085172627E-15 -100} D {-100 6.123233995736766085172627E-15 0}
|
||||
put {60deg.s} tgc V {-27500.00000000000727595761 -47631.39720814412430627272 0} H {55000.00000000002182787284 95262.79441628826316446066 6.735557395310443447840915E-12} A {3.061616997868383437016766E-15 5.302876193624534031789167E-15 -100} B {-86.60254037844386232336547 50.00000000000001421085472 0} C {3.061616997868383437016766E-15 5.302876193624534031789167E-15 -100} D {-86.60254037844386232336547 50.00000000000001421085472 0}
|
||||
put {30deg.s} tgc V {-47631.39720814413158223033 -27499.99999999999636202119 0} H {95262.79441628826316446066 55000 6.735557395310443447840915E-12} A {5.302876193624534820650073E-15 3.061616997868382253725408E-15 -100} B {-49.99999999999999289457264 86.60254037844387653422018 0} C {5.302876193624534820650073E-15 3.061616997868382253725408E-15 -100} D {-49.99999999999999289457264 86.60254037844387653422018 0}
|
||||
put {grid.r} comb region yes tree {u {u {u {u {u {l 50m_ring.s} {l 40m_ring.s}} {u {l 30m_ring.s} {l 20m_ring.s}}} {u {u {l 10m_ring.s} {l 0deg.s}} {u {l 15deg.s} {l 30deg.s}}}} {u {u {u {l 45deg.s} {l 60deg.s}} {u {l 75deg.s} {l 90deg.s}}} {u {u {l 105deg.s} {l 120deg.s}} {u {l 135deg.s} {l 150deg.s}}}}} {l 165deg.s}}
|
||||
attr set {grid.r} {region} {R} {shader} {plastic} {region_id} {1001} {material_id} {1} {los} {100} {color} {255/255/255}
|
||||
put {c1.tgc} tgc V {0 0 0} H {0 0 2000} A {1000 0 0} B {0 1000 0} C {1000 0 0} D {0 1000 0}
|
||||
put {0deg.s} tgc V {-55000 0 0} H {110000.0000000000145519152 0 6.735557395310443447840915E-12} A {6.123233995736766085172627E-15 0 -100} B {0 100 0} C {6.123233995736766085172627E-15 0 -100} D {0 100 0}
|
||||
put {all.g} comb region no tree {u {u {u {- {l ground.r} {l grid.r}} {- {l grid.r} {l c1.tgc}}} {l cylinder.r}} {l light.r}}
|
||||
@@ -1,24 +0,0 @@
|
||||
title {Example rounding methods}
|
||||
units mm
|
||||
put {m2cuttop.tor} tor V {0 0 500} H {0 0 1} r_a 250 r_h 50
|
||||
put {m2bottom.tor} tor V {0 0 -450} H {0 0 1} r_a 200 r_h 50
|
||||
put {cylinder.rcc} tgc V {0 0 -500} H {0 0 1000} A {250 0 0} B {0 250 0} C {250 0 0} D {0 250 0}
|
||||
put {fillends.rcc} tgc V {0 0 -550} H {0 0 1100} A {0 -200 0} B {200 0 0} C {0 -200 0} D {200 0 0}
|
||||
put {filltop.rcc} tgc V {0 0 500} H {0 0 50} A {0 -200 0} B {200 0 0} C {0 -200 0} D {200 0 0}
|
||||
put {bottom.tor} tor V {0 0 -500} H {0 0 -1} r_a 200 r_h 50
|
||||
put {cylinder.r} comb region yes tree {l cylinder.rcc}
|
||||
attr set {cylinder.r} {region} {R} {region_id} {1003} {material_id} {1} {los} {100}
|
||||
put {m2top.tor} tor V {0 0 450} H {0 0 1} r_a 200 r_h 50
|
||||
put {m2cutbottom.tor} tor V {0 0 -500} H {0 0 1} r_a 250 r_h 50
|
||||
put {method3.r} comb region yes tree {l method3}
|
||||
attr set {method3.r} {region} {R} {region_id} {1000} {material_id} {1} {los} {100}
|
||||
put {method2.r} comb region yes tree {l method2}
|
||||
attr set {method2.r} {region} {R} {region_id} {1002} {material_id} {1} {los} {100}
|
||||
put {method1.r} comb region yes tree {l method1}
|
||||
attr set {method1.r} {region} {R} {region_id} {1000} {material_id} {1} {los} {100}
|
||||
put {top.tor} tor V {0 0 500} H {0 0 1} r_a 200 r_h 50
|
||||
put {method3} comb region no tree {u {u {u {l cylinder.rcc} {l top.tor}} {u {l bottom.tor} {l filltop.rcc}}} {l fillbottom.rcc}}
|
||||
put {method2} comb region no tree {u {u {- {- {l cylinder.rcc} {l m2cuttop.tor}} {l m2cutbottom.tor}} {l m2top.tor}} {l m2bottom.tor}}
|
||||
put {method1} comb region no tree {u {u {l cylinder.rcc} {l fillends.rcc}} {u {l top.tor} {l bottom.tor}}}
|
||||
put {fillbottom.rcc} tgc V {0 0 -550} H {0 0 50} A {0 -200 0} B {200 0 0} C {0 -200 0} D {200 0 0}
|
||||
put {all.g} comb region no tree {u {u {l method1.r {1 0 0 1000 0 1 0 -1000 0 0 1 0 0 0 0 1}} {l method2.r {1 0 0 1000 0 1 0 0 0 0 1 0 0 0 0 1}}} {u {l method3.r {1 0 0 1000 0 1 0 1000 0 0 1 0 0 0 0 1}} {l cylinder.r}}}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user