Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Integration request to master #336

Merged
merged 36 commits into from
Feb 3, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
16d1124
Documentation - Update links in README #293
dpasukhi Jan 27, 2025
78fb186
Modeling - NURB Convert fix for degenerated #295
dpasukhi Jan 28, 2025
16ed3b4
Modeling - Resetting Plane YVector #296
dpasukhi Jan 28, 2025
cde7bab
Modeling - Add closed state handling in BRepLib_MakeEdge #297
dpasukhi Jan 28, 2025
8caf515
Modeling - Enhance intersection handling for closed curves in IntPatc…
dpasukhi Jan 28, 2025
d409a36
Modeling - Add warning for incomplete wire detection in WireFromList …
dpasukhi Jan 28, 2025
22126df
Modeling - Add boundary check in BRepFill_Filling to handle empty bou…
dpasukhi Jan 28, 2025
2889518
Modeling - Degenerated curve on offset #301
dpasukhi Jan 28, 2025
870d891
Data Exchange - Step thread safety improvement #307
AtheneNoctuaPt Jan 30, 2025
491e742
Visualization - AIS_Manipulator is unusable when attaching to objects…
mzernova Jan 31, 2025
d65feb6
Configuration - Version information update #308
dpasukhi Jan 31, 2025
fbee65e
Configuration - Static library warning #310
dpasukhi Jan 31, 2025
c8c36fd
Visualization - Implement interface to change myToFlipOutput of OpenG…
mzernova Jan 31, 2025
2d4070b
Visualization, Aspect_OpenVRSession - fix JSON file path when it is l…
gkv311 Oct 25, 2023
104c5f4
Data Exchange, XCAFDoc_ColorTool::AddColor() - fix generated HEX name…
gkv311 Oct 25, 2023
fb3c2c7
Visualization, OpenGl_GraduatedTrihedron - fix misprint in drawing li…
gkv311 Oct 26, 2023
69281b1
Configuration, TKV3d - remove redundant dependency from OpenGL #319
gkv311 Aug 3, 2024
73fcf4b
Coding, Emscripten - fix runtime crashes on WASM64 (-sMEMORY64=1) #320
gkv311 Jan 31, 2025
2027acc
Configuration - Message about compiler limitation #311
dpasukhi Jan 31, 2025
8a067c4
Configuration - Version detection on MacOS #313
dpasukhi Jan 31, 2025
4012dc4
Testing - Marking Win retesting failed #314
dpasukhi Jan 31, 2025
60360e3
Foundation Classes - BVH surface area calculation for transformed box…
Feb 1, 2025
4b608f0
Data Exchange, Step Import - Adding product attributes to metadata #315
AtheneNoctuaPt Feb 1, 2025
45a52df
Configuration - Git commit info missed #323
dpasukhi Feb 1, 2025
afb0a7e
Testing - GH Summary disabling for cancellation #325
dpasukhi Feb 1, 2025
159f5b8
Data Exchange - StepExport non-manifold missed parameter #324
dpasukhi Feb 1, 2025
98a28c4
Visualization - flat skin for AIS_Manipulator presentation #321
mzernova Feb 1, 2025
fda875b
Visualization - Add test for flipped view #328
mzernova Feb 1, 2025
68a9da9
Testing - Summary image diff keeping #326
dpasukhi Feb 1, 2025
16d36a4
Testing - Disable summarization on cancellation #330
dpasukhi Feb 2, 2025
053e01e
Testing - Inspector building on GH #329
dpasukhi Feb 2, 2025
174b985
GLTF Export - Edge and Vertex support #243
Jan 5, 2025
b9429d0
GLTF Import - Edge and Vertex support #242
Jan 5, 2025
3ce9ec7
Testing - Marking failed code formatting #332
dpasukhi Feb 3, 2025
1f386af
Coding - Update method guards for consistency #333
dpasukhi Feb 3, 2025
cc30b93
Coding - Bump version to 7.9.0.beta1 #335
dpasukhi Feb 3, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
90 changes: 90 additions & 0 deletions .github/actions/build-tinspector/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
name: 'Build TInspector'
description: 'Build TInspector using OCCT installation as a separate job'

inputs:
platform:
description: 'Build platform (windows/linux)'
required: true
install-artifact-name:
description: 'OCCT installation artifact name'
required: true
thirdparty_url:
description: 'URL to download 3rdparty dependencies'
required: false
default: 'https://github.com/Open-Cascade-SAS/OCCT/releases/download/V7_8_0/3rdparty-vc14-64.zip'

runs:
using: "composite"
steps:
- name: Checkout repository
uses: actions/[email protected]

- name: Download OCCT installation
uses: actions/[email protected]
with:
name: ${{ inputs.install-artifact-name }}
path: occt-install

- name: Install Windows dependencies
if: inputs.platform == 'windows'
shell: pwsh
run: |
Invoke-WebRequest -Uri ${{ inputs.thirdparty_url }} -OutFile 3rdparty-vc14-64.zip
Expand-Archive -Path 3rdparty-vc14-64.zip -DestinationPath .
Remove-Item 3rdparty-vc14-64.zip


- name: Install Linux dependencies
if: inputs.platform == 'linux'
shell: bash
run: sudo apt-get update && sudo apt-get install -y tcl-dev tk-dev cmake gcc g++ make libbtbb-dev libx11-dev libglu1-mesa-dev tcllib tcl-thread tcl libvtk9-dev libopenvr-dev libdraco-dev libfreeimage-dev libegl1-mesa-dev libgles2-mesa-dev libfreetype-dev qtbase5-dev qt5-qmake qtbase5-dev-tools qtdeclarative5-dev qttools5-dev qttools5-dev-tools

- name: Configure TInspector - Windows
if: inputs.platform == 'windows'
shell: pwsh
run: |
cd tools
mkdir build
cd build
cmake -G "Visual Studio 17 2022" -A x64 `
-D CMAKE_BUILD_TYPE=Release `
-D BUILD_SHARED_LIBS=ON `
-D 3RDPARTY_DIR=${{ github.workspace }}//3rdparty-vc14-64 `
-D OpenCASCADE_DIR=${{ github.workspace }}/occt-install `
-D INSTALL_DIR=${{ github.workspace }}/tools/install `
..

- name: Configure TInspector - Linux
if: inputs.platform == 'linux'
shell: bash
run: |
cd tools
mkdir build
cd build
cmake -G "Unix Makefiles" \
-D CMAKE_BUILD_TYPE=Release \
-D BUILD_SHARED_LIBS=ON \
-D OpenCASCADE_DIR=${{ github.workspace }}/occt-install \
-D INSTALL_DIR=${{ github.workspace }}/tools/install \
..

- name: Build TInspector - Windows
if: inputs.platform == 'windows'
shell: pwsh
run: |
cd tools/build
cmake --build . --config Release --target install

- name: Build TInspector - Linux
if: inputs.platform == 'linux'
shell: bash
run: |
cd tools/build
make install -j$(nproc)

- name: Upload TInspector installation
uses: actions/[email protected]
with:
name: inspector-${{ inputs.platform }}-x64
path: tools/install
retention-days: 7
Original file line number Diff line number Diff line change
@@ -1,73 +1,68 @@
# This workflow checks the code formatting of changed files in a pull request using clang-format.
# It is triggered on pull requests to the master branch.
# The workflow verifies that the clang-format version matches 18.1.8,
# checks formatting of modified files, and if formatting issues are found,
# creates a patch file that can be applied to fix the formatting.
name: 'Clang-Format Code Check'
description: 'Check code formatting of changed files using clang-format'
inputs:
base-ref:
description: 'Base reference to compare changes against'
required: true
default: 'master'
file-pattern:
description: 'Pattern to match files for formatting check'
required: false
default: '^(src|tools)/.*\.(cpp|hxx|cxx|lxx|h|pxx|hpp)$'
clang-format-version:
description: 'Required clang-format version'
required: false
default: '18.1.8'

name: Clang-Format Check

on:
pull_request:
branches:
- '**'

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number }}
cancel-in-progress: true

jobs:
format-check:
name: Check code formatting
runs-on: windows-2022

steps:
- name: Checkout repository
uses: actions/[email protected]
with:
fetch-depth: 0
outputs:
has-changes:
description: 'Whether any files needed formatting'
value: ${{ steps.git-check.outputs.has_changes }}

runs:
using: "composite"
steps:
- name: Check clang-format version
shell: pwsh
run: |
$version = clang-format --version
Write-Output "Detected clang-format version: $version"
$version | Select-String "18.1.8" >$null
$version | Select-String "${{ inputs.clang-format-version }}" >$null
if ($LASTEXITCODE -ne 0) {
echo "::error::Wrong clang-format version. Expected 18.1.8"
Write-Output "Error: Version mismatch - expected 18.1.8"
echo "::error::Wrong clang-format version. Expected ${{ inputs.clang-format-version }}"
Write-Output "Error: Version mismatch - expected ${{ inputs.clang-format-version }}"
exit 1
}
shell: pwsh

- name: Get changed files
id: changed-files
shell: pwsh
run: |
$changedFiles = git diff --name-only origin/${{ github.base_ref }} HEAD |
Where-Object { $_ -match '^(src|tools)/' -and $_ -match '\.(cpp|hxx|cxx|lxx|h|pxx|hpp)$' }
$changedFiles = git diff --name-only origin/${{ inputs.base-ref }} HEAD |
Where-Object { $_ -match '${{ inputs.file-pattern }}' }
$changedFiles | Set-Content "changed_files.txt"
if ($changedFiles.Count -gt 0) {
echo "has_files=true" >> $env:GITHUB_OUTPUT
}
shell: pwsh

- name: Check formatting
id: check
if: steps.changed-files.outputs.has_files == 'true'
shell: pwsh
run: |
$files = Get-Content "changed_files.txt"
$files | ForEach-Object -ThrottleLimit 8 -Parallel {
clang-format -i -style=file $_
}
shell: pwsh

- name: Check git status
id: git-check
if: steps.changed-files.outputs.has_files == 'true'
shell: pwsh
run: |
git diff > format.patch
if ((Get-Item format.patch).length -gt 0) {
echo "has_changes=true" >> $env:GITHUB_OUTPUT
}
shell: pwsh

- name: Upload patch
if: steps.git-check.outputs.has_changes == 'true'
Expand All @@ -76,9 +71,13 @@ jobs:
name: format-patch
path: format.patch

- name: Fail with instructions
- name: Failing step for formatting issues
if: steps.git-check.outputs.has_changes == 'true'
shell: pwsh
run: |
echo "::error::Files need formatting. To fix: 1. Download format.patch 2. "git apply format.patch" 3. Commit and push"
echo "::error::Files need formatting. To fix: 1. Download format.patch 2. \"git apply format.patch\" 3. Commit and push"
exit 1
shell: pwsh

branding:
icon: 'check-square'
color: 'green'
90 changes: 90 additions & 0 deletions .github/actions/scripts/cleanup_test_images.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
import os
import re
from bs4 import BeautifulSoup
from pathlib import Path
import glob

import os.path

def get_referenced_images(html_file):
# Get the directory containing the HTML file
html_dir = os.path.dirname(os.path.abspath(html_file))

with open(html_file, 'r', encoding='utf-8') as f:
soup = BeautifulSoup(f.read(), 'html.parser')

images = set()

# Extract direct image references
for img in soup.find_all('img'):
if src := img.get('src'):
# Convert relative path to absolute
abs_path = os.path.normpath(os.path.join(html_dir, src))
images.add(abs_path)

# Extract toggle references
for elem in soup.find_all(attrs={'onclick': True}):
onclick = elem['onclick']
paths = re.findall(r'diffimage_toggle\(this,"([^"]+)","([^"]+)"\)', onclick)
for src1, src2 in paths:
# Convert relative paths to absolute
abs_path1 = os.path.normpath(os.path.join(html_dir, src1))
abs_path2 = os.path.normpath(os.path.join(html_dir, src2))
images.add(abs_path1)
images.add(abs_path2)

return images

def cleanup_platform_images(results_dir, platform):
html_file = f"{results_dir}/current/{platform}/diff-*.html"
html_files = glob.glob(html_file)

if not html_files:
print(f"No diff HTML found for {platform}")
return

# Get referenced images from HTML
referenced = set()
for html in html_files:
images = get_referenced_images(html)
referenced.update(images)

# Convert relative paths to absolute
base_dir = Path(results_dir)
current_dir = base_dir / "current" / platform
master_dir = base_dir / "master" / platform

# Find all PNGs
png_files = set()
for directory in [current_dir, master_dir]:
for root, _, files in os.walk(directory):
for file in files:
if file.lower().endswith('.png'):
png_files.add(Path(root) / file)

# Remove unreferenced PNGs
for png in png_files:
if str(png) not in referenced:
try:
png.unlink()
except OSError as e:
print(f"Error removing {png}: {e}")

def main():
platforms = [
"windows-x64",
"windows-clang-x64",
"macos-x64",
"macos-gcc-x64",
"linux-clang-x64",
"linux-gcc-x64"
]

results_dir = Path("./").resolve()

for platform in platforms:
print(f"\nProcessing {platform}...")
cleanup_platform_images(results_dir, platform)

if __name__ == "__main__":
main()
Loading
Loading