Add cutout shell and volume node assets for depth volume processing

- Implemented `cutout_shell.py` to build front normals and shell positions for balloon geometry.
- Created `cutout_volume.py` to establish smooth center fields and manage balloon surface attributes.
- Introduced `pisa_sr_export.py` for exporting PiSA-SR components with dependencies and asset finalization.
This commit is contained in:
2026-09-08 17:18:03 +08:00
parent 7dec3b7ca4
commit 196b964efc
71 changed files with 3440 additions and 1988 deletions

View File

@@ -1,7 +1,7 @@
import sys
import unittest
from pathlib import Path
from types import ModuleType
from types import ModuleType, SimpleNamespace
from unittest.mock import patch
@@ -31,6 +31,20 @@ class FakeSession:
class OnnxRuntimeTest(unittest.TestCase):
def test_directml_disables_parallel_execution_and_memory_pattern(self):
options = SimpleNamespace(enable_mem_pattern=True, execution_mode="parallel")
runtime = ModuleType("onnxruntime")
runtime.get_available_providers = lambda: ["DmlExecutionProvider"]
runtime.SessionOptions = lambda: options
runtime.ExecutionMode = SimpleNamespace(ORT_SEQUENTIAL="sequential")
calls = []
runtime.InferenceSession = lambda path, **kwargs: calls.append(kwargs)
with patch.dict(sys.modules, {"onnxruntime": runtime}):
onnx_runtime.create_session("model.onnx", "directml")
self.assertFalse(options.enable_mem_pattern)
self.assertEqual(options.execution_mode, "sequential")
self.assertIs(calls[0]["sess_options"], options)
def create_runtime(self, available):
calls = []
runtime = ModuleType("onnxruntime")