ray-tracing-shapely 0.3.1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- ray_tracing_shapely/__init__.py +45 -0
- ray_tracing_shapely/analysis/__init__.py +228 -0
- ray_tracing_shapely/analysis/agentic_db.py +941 -0
- ray_tracing_shapely/analysis/agentic_tools.py +1991 -0
- ray_tracing_shapely/analysis/bidirectional.py +616 -0
- ray_tracing_shapely/analysis/fresnel_utils.py +277 -0
- ray_tracing_shapely/analysis/glass_geometry.py +1424 -0
- ray_tracing_shapely/analysis/irradiance.py +387 -0
- ray_tracing_shapely/analysis/lineage_analysis.py +501 -0
- ray_tracing_shapely/analysis/mcp_server.py +194 -0
- ray_tracing_shapely/analysis/portable_scene.py +175 -0
- ray_tracing_shapely/analysis/ray_geometry_queries.py +542 -0
- ray_tracing_shapely/analysis/ray_jobs.py +370 -0
- ray_tracing_shapely/analysis/render_result.py +123 -0
- ray_tracing_shapely/analysis/run_registry.py +398 -0
- ray_tracing_shapely/analysis/saving.py +439 -0
- ray_tracing_shapely/analysis/signature_analysis.py +629 -0
- ray_tracing_shapely/analysis/simulation_result.py +1057 -0
- ray_tracing_shapely/analysis/targeted_resimulation.py +303 -0
- ray_tracing_shapely/analysis/targeted_resimulation_flow.py +690 -0
- ray_tracing_shapely/analysis/tool_registry.py +1579 -0
- ray_tracing_shapely/core/__init__.py +34 -0
- ray_tracing_shapely/core/constants.py +47 -0
- ray_tracing_shapely/core/equation.py +597 -0
- ray_tracing_shapely/core/geometry.py +572 -0
- ray_tracing_shapely/core/glass_curves.py +827 -0
- ray_tracing_shapely/core/glass_spans.py +394 -0
- ray_tracing_shapely/core/ray.py +419 -0
- ray_tracing_shapely/core/ray_lineage.py +320 -0
- ray_tracing_shapely/core/scene.py +612 -0
- ray_tracing_shapely/core/scene_objs/__init__.py +32 -0
- ray_tracing_shapely/core/scene_objs/base_custom_surface.py +596 -0
- ray_tracing_shapely/core/scene_objs/base_filter.py +227 -0
- ray_tracing_shapely/core/scene_objs/base_glass.py +1002 -0
- ray_tracing_shapely/core/scene_objs/base_grin_glass.py +782 -0
- ray_tracing_shapely/core/scene_objs/base_scene_obj.py +704 -0
- ray_tracing_shapely/core/scene_objs/blocker/__init__.py +20 -0
- ray_tracing_shapely/core/scene_objs/blocker/blocker.py +312 -0
- ray_tracing_shapely/core/scene_objs/circle_obj_mixin.py +476 -0
- ray_tracing_shapely/core/scene_objs/glass/__init__.py +22 -0
- ray_tracing_shapely/core/scene_objs/glass/glass.py +1007 -0
- ray_tracing_shapely/core/scene_objs/glass/ideal_lens.py +469 -0
- ray_tracing_shapely/core/scene_objs/glass/spherical_lens.py +563 -0
- ray_tracing_shapely/core/scene_objs/ground_glass.py +479 -0
- ray_tracing_shapely/core/scene_objs/light_source/__init__.py +23 -0
- ray_tracing_shapely/core/scene_objs/light_source/angle_source.py +579 -0
- ray_tracing_shapely/core/scene_objs/light_source/backward_detector_source.py +222 -0
- ray_tracing_shapely/core/scene_objs/light_source/beam.py +742 -0
- ray_tracing_shapely/core/scene_objs/light_source/point_source.py +483 -0
- ray_tracing_shapely/core/scene_objs/light_source/single_ray.py +404 -0
- ray_tracing_shapely/core/scene_objs/line_obj_mixin.py +467 -0
- ray_tracing_shapely/core/scene_objs/mirror/__init__.py +21 -0
- ray_tracing_shapely/core/scene_objs/mirror/ideal_mirror.py +631 -0
- ray_tracing_shapely/core/scene_objs/mirror/mirror.py +415 -0
- ray_tracing_shapely/core/scene_objs/other/__init__.py +11 -0
- ray_tracing_shapely/core/scene_objs/other/detector.py +550 -0
- ray_tracing_shapely/core/scene_objs/param_curve_obj_mixin.py +916 -0
- ray_tracing_shapely/core/simulator.py +1575 -0
- ray_tracing_shapely/core/svg_renderer.py +2301 -0
- ray_tracing_shapely/developer_tests/_fake_modal.py +139 -0
- ray_tracing_shapely/developer_tests/_flow_jobs.py +55 -0
- ray_tracing_shapely/developer_tests/conftest.py +61 -0
- ray_tracing_shapely/developer_tests/test_angle_transformer.py +217 -0
- ray_tracing_shapely/developer_tests/test_architecture_layering.py +241 -0
- ray_tracing_shapely/developer_tests/test_asphere_curve.py +263 -0
- ray_tracing_shapely/developer_tests/test_beam_ray_count.py +79 -0
- ray_tracing_shapely/developer_tests/test_bidirectional.py +932 -0
- ray_tracing_shapely/developer_tests/test_conic_mirror.py +348 -0
- ray_tracing_shapely/developer_tests/test_context_registry.py +154 -0
- ray_tracing_shapely/developer_tests/test_contract_references.py +109 -0
- ray_tracing_shapely/developer_tests/test_curved_glass_analysis.py +266 -0
- ray_tracing_shapely/developer_tests/test_detector_agentic_tools.py +364 -0
- ray_tracing_shapely/developer_tests/test_detector_hit_records.py +770 -0
- ray_tracing_shapely/developer_tests/test_eye_safety.py +1531 -0
- ray_tracing_shapely/developer_tests/test_eye_safety_classification_flow.py +1308 -0
- ray_tracing_shapely/developer_tests/test_flow_executors.py +366 -0
- ray_tracing_shapely/developer_tests/test_flow_tools.py +234 -0
- ray_tracing_shapely/developer_tests/test_flows_dashboard.py +168 -0
- ray_tracing_shapely/developer_tests/test_flows_package.py +96 -0
- ray_tracing_shapely/developer_tests/test_glass_arc_exit.py +79 -0
- ray_tracing_shapely/developer_tests/test_glass_curves.py +312 -0
- ray_tracing_shapely/developer_tests/test_grazing_incidence.py +510 -0
- ray_tracing_shapely/developer_tests/test_irradiance.py +124 -0
- ray_tracing_shapely/developer_tests/test_led_collimators.py +279 -0
- ray_tracing_shapely/developer_tests/test_linear_sensor.py +456 -0
- ray_tracing_shapely/developer_tests/test_mirror_coated_edge.py +109 -0
- ray_tracing_shapely/developer_tests/test_modal_executor.py +250 -0
- ray_tracing_shapely/developer_tests/test_nonimaging_geometry.py +415 -0
- ray_tracing_shapely/developer_tests/test_nonimaging_prisms.py +213 -0
- ray_tracing_shapely/developer_tests/test_phase1_agentic_db.py +498 -0
- ray_tracing_shapely/developer_tests/test_phase2_schemas_and_lineage.py +443 -0
- ray_tracing_shapely/developer_tests/test_phase3_render_result.py +358 -0
- ray_tracing_shapely/developer_tests/test_phase7_agentic_svg_tools.py +378 -0
- ray_tracing_shapely/developer_tests/test_physical_scene.py +524 -0
- ray_tracing_shapely/developer_tests/test_portable_resimulation.py +249 -0
- ray_tracing_shapely/developer_tests/test_prisms.py +1150 -0
- ray_tracing_shapely/developer_tests/test_profile_export.py +265 -0
- ray_tracing_shapely/developer_tests/test_profile_scan.py +276 -0
- ray_tracing_shapely/developer_tests/test_radiation_plot.py +107 -0
- ray_tracing_shapely/developer_tests/test_ray_jobs.py +133 -0
- ray_tracing_shapely/developer_tests/test_ray_lineage.py +164 -0
- ray_tracing_shapely/developer_tests/test_rayfile.py +110 -0
- ray_tracing_shapely/developer_tests/test_rayfile_slice.py +115 -0
- ray_tracing_shapely/developer_tests/test_rayfile_slicing_flow.py +222 -0
- ray_tracing_shapely/developer_tests/test_rayfile_source_spec.py +108 -0
- ray_tracing_shapely/developer_tests/test_refractometer_prism.py +393 -0
- ray_tracing_shapely/developer_tests/test_roles.py +197 -0
- ray_tracing_shapely/developer_tests/test_rr_lens.py +239 -0
- ray_tracing_shapely/developer_tests/test_run_registry.py +349 -0
- ray_tracing_shapely/developer_tests/test_rx_concentrator.py +93 -0
- ray_tracing_shapely/developer_tests/test_rxi.py +326 -0
- ray_tracing_shapely/developer_tests/test_rxi_direct.py +279 -0
- ray_tracing_shapely/developer_tests/test_saved_runs_in_context.py +261 -0
- ray_tracing_shapely/developer_tests/test_signature_analysis.py +531 -0
- ray_tracing_shapely/developer_tests/test_singlet_lens_profile.py +362 -0
- ray_tracing_shapely/developer_tests/test_sms_chain.py +398 -0
- ray_tracing_shapely/developer_tests/test_sms_claims.py +264 -0
- ray_tracing_shapely/developer_tests/test_sms_splines.py +140 -0
- ray_tracing_shapely/developer_tests/test_source_spec.py +190 -0
- ray_tracing_shapely/developer_tests/test_spherical_lens.py +124 -0
- ray_tracing_shapely/developer_tests/test_spline_mirror.py +112 -0
- ray_tracing_shapely/developer_tests/test_surface_hit_records.py +405 -0
- ray_tracing_shapely/developer_tests/test_svg_renderer.py +516 -0
- ray_tracing_shapely/developer_tests/test_targeted_resimulation.py +359 -0
- ray_tracing_shapely/developer_tests/test_targeted_resimulation_flow.py +281 -0
- ray_tracing_shapely/developer_tests/test_tir_analysis.py +511 -0
- ray_tracing_shapely/developer_tests/test_tool_lists.py +145 -0
- ray_tracing_shapely/developer_tests/test_version.py +35 -0
- ray_tracing_shapely/developer_tests/test_xr_concentrator.py +130 -0
- ray_tracing_shapely/examples/bulk_lens_demo/bulk_lens_collimation_demo.py +251 -0
- ray_tracing_shapely/examples/bulk_lens_demo/lens_validator.py +227 -0
- ray_tracing_shapely/examples/bulk_lens_demo/test_arc_rendering.py +223 -0
- ray_tracing_shapely/examples/bulk_lens_demo/test_corrected_lens.py +141 -0
- ray_tracing_shapely/examples/bulk_lens_demo/test_single_lens.py +139 -0
- ray_tracing_shapely/examples/collimation_demo/demo.py +218 -0
- ray_tracing_shapely/examples/coupled_prisms/test_glass_geometry.py +182 -0
- ray_tracing_shapely/examples/coupled_prisms/test_surface_merging.py +128 -0
- ray_tracing_shapely/examples/coupled_prisms/uncoupled_copled_prisms.py +613 -0
- ray_tracing_shapely/examples/reflectometer_1/fig_1.py +17 -0
- ray_tracing_shapely/examples/tir_demo/test_verbose.py +90 -0
- ray_tracing_shapely/examples/tir_demo/test_verbose_propagation.py +182 -0
- ray_tracing_shapely/examples/tir_demo/tir_demo.py +278 -0
- ray_tracing_shapely/flows/__init__.py +124 -0
- ray_tracing_shapely/flows/agentic.py +293 -0
- ray_tracing_shapely/flows/budgets.py +138 -0
- ray_tracing_shapely/flows/dashboard.py +631 -0
- ray_tracing_shapely/flows/executors.py +561 -0
- ray_tracing_shapely/flows/fields.py +160 -0
- ray_tracing_shapely/flows/flow_base.py +840 -0
- ray_tracing_shapely/flows/kinds.py +110 -0
- ray_tracing_shapely/flows/modal_executor.py +537 -0
- ray_tracing_shapely/flows/persistence.py +255 -0
- ray_tracing_shapely/flows/runs.py +173 -0
- ray_tracing_shapely/flows/worker.py +35 -0
- ray_tracing_shapely/optical_elements/__init__.py +218 -0
- ray_tracing_shapely/optical_elements/eye_safety/__init__.py +140 -0
- ray_tracing_shapely/optical_elements/eye_safety/angular_subtense.py +147 -0
- ray_tracing_shapely/optical_elements/eye_safety/correction_factors.py +157 -0
- ray_tracing_shapely/optical_elements/eye_safety/exposure_duration.py +162 -0
- ray_tracing_shapely/optical_elements/eye_safety/hazard_functions.py +225 -0
- ray_tracing_shapely/optical_elements/eye_safety/iec60825_1.py +741 -0
- ray_tracing_shapely/optical_elements/eye_safety/iec62471.py +755 -0
- ray_tracing_shapely/optical_elements/eye_safety/pupil_aperture.py +182 -0
- ray_tracing_shapely/optical_elements/eye_safety/radiometry_conversions.py +81 -0
- ray_tracing_shapely/optical_elements/eye_safety/result.py +90 -0
- ray_tracing_shapely/optical_elements/eye_safety/spectral_data.py +249 -0
- ray_tracing_shapely/optical_elements/eye_safety_classification_flow/__init__.py +138 -0
- ray_tracing_shapely/optical_elements/eye_safety_classification_flow/dashboard.py +29 -0
- ray_tracing_shapely/optical_elements/eye_safety_classification_flow/dimensional_checks.py +249 -0
- ray_tracing_shapely/optical_elements/eye_safety_classification_flow/explanations.py +226 -0
- ray_tracing_shapely/optical_elements/eye_safety_classification_flow/flow_base.py +29 -0
- ray_tracing_shapely/optical_elements/eye_safety_classification_flow/iec60825_1_flow.py +275 -0
- ray_tracing_shapely/optical_elements/eye_safety_classification_flow/iec62471_flow.py +439 -0
- ray_tracing_shapely/optical_elements/eye_safety_classification_flow/intake_flow.py +716 -0
- ray_tracing_shapely/optical_elements/eye_safety_classification_flow/persistence.py +29 -0
- ray_tracing_shapely/optical_elements/lenses/__init__.py +39 -0
- ray_tracing_shapely/optical_elements/lenses/collimator_design.py +168 -0
- ray_tracing_shapely/optical_elements/lenses/fresnel.py +333 -0
- ray_tracing_shapely/optical_elements/lenses/profile_scan.py +792 -0
- ray_tracing_shapely/optical_elements/lenses/singlet.py +300 -0
- ray_tracing_shapely/optical_elements/lenses/tir_collimator.py +421 -0
- ray_tracing_shapely/optical_elements/mirrors/__init__.py +26 -0
- ray_tracing_shapely/optical_elements/mirrors/conic.py +330 -0
- ray_tracing_shapely/optical_elements/mirrors/sheet_profile.py +216 -0
- ray_tracing_shapely/optical_elements/mirrors/spline.py +195 -0
- ray_tracing_shapely/optical_elements/physical_scene.py +114 -0
- ray_tracing_shapely/optical_elements/physics/__init__.py +41 -0
- ray_tracing_shapely/optical_elements/physics/exceptions.py +25 -0
- ray_tracing_shapely/optical_elements/physics/liv_curve.py +54 -0
- ray_tracing_shapely/optical_elements/physics/photoconversion.py +259 -0
- ray_tracing_shapely/optical_elements/physics/photoemission.py +83 -0
- ray_tracing_shapely/optical_elements/physics/projection.py +299 -0
- ray_tracing_shapely/optical_elements/prisms/__init__.py +283 -0
- ray_tracing_shapely/optical_elements/prisms/angle_transformer.py +193 -0
- ray_tracing_shapely/optical_elements/prisms/base_prism.py +983 -0
- ray_tracing_shapely/optical_elements/prisms/dtirc.py +245 -0
- ray_tracing_shapely/optical_elements/prisms/equilateral.py +243 -0
- ray_tracing_shapely/optical_elements/prisms/nonimaging_geometry.py +471 -0
- ray_tracing_shapely/optical_elements/prisms/prism_utils.py +472 -0
- ray_tracing_shapely/optical_elements/prisms/profile_export.py +760 -0
- ray_tracing_shapely/optical_elements/prisms/refractometer.py +849 -0
- ray_tracing_shapely/optical_elements/prisms/right_angle.py +285 -0
- ray_tracing_shapely/optical_elements/prisms/rr_lens.py +309 -0
- ray_tracing_shapely/optical_elements/prisms/rx_concentrator.py +251 -0
- ray_tracing_shapely/optical_elements/prisms/rxi.py +355 -0
- ray_tracing_shapely/optical_elements/prisms/rxi_direct.py +507 -0
- ray_tracing_shapely/optical_elements/prisms/sms_chain.py +884 -0
- ray_tracing_shapely/optical_elements/prisms/tir_utils.py +459 -0
- ray_tracing_shapely/optical_elements/prisms/xr_concentrator.py +320 -0
- ray_tracing_shapely/optical_elements/roles.py +76 -0
- ray_tracing_shapely/optical_elements/sensors/__init__.py +35 -0
- ray_tracing_shapely/optical_elements/sensors/linear_sensor.py +550 -0
- ray_tracing_shapely/optical_elements/sources/__init__.py +33 -0
- ray_tracing_shapely/optical_elements/sources/radiation_plot.py +316 -0
- ray_tracing_shapely/optical_elements/sources/ray_set_source.py +148 -0
- ray_tracing_shapely/optical_elements/sources/rayfile.py +276 -0
- ray_tracing_shapely/optical_elements/sources/rayfile_slice.py +205 -0
- ray_tracing_shapely/optical_elements/sources/rayfile_slicing_flow.py +607 -0
- ray_tracing_shapely/optical_elements/sources/source_spec.py +574 -0
- ray_tracing_shapely/optical_elements/units.py +277 -0
- ray_tracing_shapely-0.3.1.dist-info/METADATA +227 -0
- ray_tracing_shapely-0.3.1.dist-info/RECORD +224 -0
- ray_tracing_shapely-0.3.1.dist-info/WHEEL +5 -0
- ray_tracing_shapely-0.3.1.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Original work Copyright 2024 The Ray Optics Simulation authors and contributors
|
|
3
|
+
Python translation Copyright 2026 ray-tracing-shapely authors and contributors
|
|
4
|
+
|
|
5
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
you may not use this file except in compliance with the License.
|
|
7
|
+
You may obtain a copy of the License at
|
|
8
|
+
|
|
9
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
|
|
11
|
+
Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
See the License for the specific language governing permissions and
|
|
15
|
+
limitations under the License.
|
|
16
|
+
|
|
17
|
+
Ray Tracing Shapely
|
|
18
|
+
===================
|
|
19
|
+
|
|
20
|
+
A Python ray tracing library using Shapely for computational geometry.
|
|
21
|
+
|
|
22
|
+
Main modules:
|
|
23
|
+
- core: Core simulation engine (Scene, Simulator, Ray, optical objects)
|
|
24
|
+
- analysis: Python-specific analysis utilities (geometry analysis)
|
|
25
|
+
- examples: Example simulations and demonstrations
|
|
26
|
+
|
|
27
|
+
Quick start:
|
|
28
|
+
from ray_tracing_shapely.core.scene import Scene
|
|
29
|
+
from ray_tracing_shapely.core.scene_objs import Glass, SingleRay
|
|
30
|
+
from ray_tracing_shapely.core.simulator import Simulator
|
|
31
|
+
"""
|
|
32
|
+
|
|
33
|
+
__version__ = "0.3.1"
|
|
34
|
+
|
|
35
|
+
# Convenience imports for common usage
|
|
36
|
+
from .core.scene import Scene
|
|
37
|
+
from .core.simulator import Simulator
|
|
38
|
+
from .core.ray import Ray
|
|
39
|
+
|
|
40
|
+
__all__ = [
|
|
41
|
+
'Scene',
|
|
42
|
+
'Simulator',
|
|
43
|
+
'Ray',
|
|
44
|
+
'__version__',
|
|
45
|
+
]
|
|
@@ -0,0 +1,228 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Python-specific module: analysis package
|
|
3
|
+
Copyright 2026 ray-tracing-shapely authors and contributors
|
|
4
|
+
|
|
5
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
you may not use this file except in compliance with the License.
|
|
7
|
+
You may obtain a copy of the License at
|
|
8
|
+
|
|
9
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
|
|
11
|
+
Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
See the License for the specific language governing permissions and
|
|
15
|
+
limitations under the License.
|
|
16
|
+
|
|
17
|
+
===============================================================================
|
|
18
|
+
PYTHON-SPECIFIC MODULE: Analysis Utilities
|
|
19
|
+
===============================================================================
|
|
20
|
+
This module is a Python-specific addition and does NOT exist in the original
|
|
21
|
+
JavaScript Ray Optics Simulation codebase. It provides analysis utilities for
|
|
22
|
+
extracting geometric information from scenes, such as:
|
|
23
|
+
|
|
24
|
+
- Glass boundary properties (area, centroid, perimeter)
|
|
25
|
+
- Interface detection between adjacent glass objects
|
|
26
|
+
- Interface properties (length, center, normal vectors)
|
|
27
|
+
|
|
28
|
+
These utilities leverage the Shapely library for computational geometry
|
|
29
|
+
operations that are not available in the JavaScript version.
|
|
30
|
+
===============================================================================
|
|
31
|
+
"""
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
from .glass_geometry import (
|
|
35
|
+
GlassInterface,
|
|
36
|
+
GlassBoundary,
|
|
37
|
+
SceneGeometryAnalysis,
|
|
38
|
+
analyze_scene_geometry,
|
|
39
|
+
glass_to_polygon,
|
|
40
|
+
# Edge description (Python-specific)
|
|
41
|
+
EdgeType,
|
|
42
|
+
EdgeDescription,
|
|
43
|
+
get_edge_descriptions,
|
|
44
|
+
describe_edges,
|
|
45
|
+
edge_linestring,
|
|
46
|
+
edge_point_at,
|
|
47
|
+
edge_outward_normal,
|
|
48
|
+
# Prism description (Python-specific)
|
|
49
|
+
describe_prism,
|
|
50
|
+
)
|
|
51
|
+
from .saving import (
|
|
52
|
+
save_rays_csv,
|
|
53
|
+
rays_to_xml,
|
|
54
|
+
filter_tir_rays,
|
|
55
|
+
filter_grazing_rays,
|
|
56
|
+
get_ray_statistics,
|
|
57
|
+
)
|
|
58
|
+
from .simulation_result import (
|
|
59
|
+
SceneSnapshot,
|
|
60
|
+
SimulationResult,
|
|
61
|
+
describe_simulation_result,
|
|
62
|
+
)
|
|
63
|
+
from .ray_geometry_queries import (
|
|
64
|
+
# Phase 0: Scene object lookup
|
|
65
|
+
get_object_by_name,
|
|
66
|
+
get_object_by_uuid,
|
|
67
|
+
get_objects_by_type,
|
|
68
|
+
# Phase 1: Ray-geometry queries
|
|
69
|
+
find_rays_inside_glass,
|
|
70
|
+
find_rays_crossing_edge,
|
|
71
|
+
find_rays_by_angle_to_edge,
|
|
72
|
+
find_rays_by_polarization,
|
|
73
|
+
# Phase 2: Geometry convenience utilities
|
|
74
|
+
interpolate_along_edge,
|
|
75
|
+
normal_along_edge,
|
|
76
|
+
describe_all_glass_edges,
|
|
77
|
+
)
|
|
78
|
+
from .fresnel_utils import (
|
|
79
|
+
fresnel_transmittances,
|
|
80
|
+
critical_angle,
|
|
81
|
+
brewster_angle,
|
|
82
|
+
tir_analysis,
|
|
83
|
+
)
|
|
84
|
+
from .tool_registry import (
|
|
85
|
+
list_available_tools,
|
|
86
|
+
get_agentic_tools,
|
|
87
|
+
get_exposed_tools,
|
|
88
|
+
register_tool,
|
|
89
|
+
withdrawn_tools,
|
|
90
|
+
check_tool_lists,
|
|
91
|
+
generate_tool_note_for_solveit_notebook,
|
|
92
|
+
generate_tool_note_for_copilot,
|
|
93
|
+
)
|
|
94
|
+
from .agentic_tools import (
|
|
95
|
+
set_context,
|
|
96
|
+
set_context_from_result,
|
|
97
|
+
get_context,
|
|
98
|
+
clear_context,
|
|
99
|
+
set_extension_context,
|
|
100
|
+
get_extension_context,
|
|
101
|
+
list_contexts,
|
|
102
|
+
set_active_context,
|
|
103
|
+
drop_context,
|
|
104
|
+
list_sources,
|
|
105
|
+
load_run_context,
|
|
106
|
+
save_context_tool,
|
|
107
|
+
compare_persisted_runs_tool,
|
|
108
|
+
register_run_file_loader,
|
|
109
|
+
DEFAULT_CONTEXT_NAME,
|
|
110
|
+
# Phase 1: SQL query tools
|
|
111
|
+
query_rays,
|
|
112
|
+
describe_schema,
|
|
113
|
+
# Phase 2: Lineage + Fresnel agentic wrappers
|
|
114
|
+
rank_paths_by_energy,
|
|
115
|
+
check_energy_conservation,
|
|
116
|
+
fresnel_transmittances_tool,
|
|
117
|
+
tir_analysis_tool,
|
|
118
|
+
# Legacy XML tools (backward compat)
|
|
119
|
+
find_rays_inside_glass_xml,
|
|
120
|
+
find_rays_crossing_edge_xml,
|
|
121
|
+
find_rays_by_angle_to_edge_xml,
|
|
122
|
+
find_rays_by_polarization_xml,
|
|
123
|
+
# Phase 3: SVG rendering tools
|
|
124
|
+
render_scene_svg,
|
|
125
|
+
highlight_rays_inside_glass_svg,
|
|
126
|
+
highlight_rays_crossing_edge_svg,
|
|
127
|
+
highlight_rays_by_polarization_svg,
|
|
128
|
+
highlight_custom_rays_svg,
|
|
129
|
+
)
|
|
130
|
+
from .render_result import (
|
|
131
|
+
save_render,
|
|
132
|
+
reset_render_counter,
|
|
133
|
+
)
|
|
134
|
+
from .agentic_db import (
|
|
135
|
+
create_database,
|
|
136
|
+
)
|
|
137
|
+
|
|
138
|
+
__all__ = [
|
|
139
|
+
# Glass geometry analysis
|
|
140
|
+
'GlassInterface',
|
|
141
|
+
'GlassBoundary',
|
|
142
|
+
'SceneGeometryAnalysis',
|
|
143
|
+
'analyze_scene_geometry',
|
|
144
|
+
'glass_to_polygon',
|
|
145
|
+
# Edge description (Python-specific)
|
|
146
|
+
'EdgeType',
|
|
147
|
+
'EdgeDescription',
|
|
148
|
+
'get_edge_descriptions',
|
|
149
|
+
'describe_edges',
|
|
150
|
+
'edge_linestring',
|
|
151
|
+
'edge_point_at',
|
|
152
|
+
'edge_outward_normal',
|
|
153
|
+
# Prism description (Python-specific)
|
|
154
|
+
'describe_prism',
|
|
155
|
+
# Ray data export and statistics
|
|
156
|
+
'save_rays_csv',
|
|
157
|
+
'rays_to_xml',
|
|
158
|
+
'filter_tir_rays',
|
|
159
|
+
'filter_grazing_rays',
|
|
160
|
+
'get_ray_statistics',
|
|
161
|
+
# Simulation result container (Python-specific)
|
|
162
|
+
'SceneSnapshot',
|
|
163
|
+
'SimulationResult',
|
|
164
|
+
'describe_simulation_result',
|
|
165
|
+
# Scene object lookup (Python-specific)
|
|
166
|
+
'get_object_by_name',
|
|
167
|
+
'get_object_by_uuid',
|
|
168
|
+
'get_objects_by_type',
|
|
169
|
+
# Ray-geometry queries (Python-specific)
|
|
170
|
+
'find_rays_inside_glass',
|
|
171
|
+
'find_rays_crossing_edge',
|
|
172
|
+
'find_rays_by_angle_to_edge',
|
|
173
|
+
'find_rays_by_polarization',
|
|
174
|
+
'interpolate_along_edge',
|
|
175
|
+
'normal_along_edge',
|
|
176
|
+
'describe_all_glass_edges',
|
|
177
|
+
# Fresnel equation utilities (Python-specific)
|
|
178
|
+
'fresnel_transmittances',
|
|
179
|
+
'critical_angle',
|
|
180
|
+
'brewster_angle',
|
|
181
|
+
'tir_analysis',
|
|
182
|
+
# Tool discovery (Python-specific)
|
|
183
|
+
'list_available_tools',
|
|
184
|
+
'get_agentic_tools',
|
|
185
|
+
'get_exposed_tools',
|
|
186
|
+
'register_tool',
|
|
187
|
+
'withdrawn_tools',
|
|
188
|
+
'check_tool_lists',
|
|
189
|
+
'generate_tool_note_for_solveit_notebook',
|
|
190
|
+
'generate_tool_note_for_copilot',
|
|
191
|
+
# Agentic tools -- JSON-serializable wrappers (Python-specific)
|
|
192
|
+
'set_context',
|
|
193
|
+
'set_context_from_result',
|
|
194
|
+
'get_context',
|
|
195
|
+
'clear_context',
|
|
196
|
+
'set_extension_context',
|
|
197
|
+
'get_extension_context',
|
|
198
|
+
'list_contexts',
|
|
199
|
+
'set_active_context',
|
|
200
|
+
'drop_context',
|
|
201
|
+
'list_sources',
|
|
202
|
+
'load_run_context',
|
|
203
|
+
'save_context_tool',
|
|
204
|
+
'compare_persisted_runs_tool',
|
|
205
|
+
'register_run_file_loader',
|
|
206
|
+
'DEFAULT_CONTEXT_NAME',
|
|
207
|
+
'query_rays',
|
|
208
|
+
'describe_schema',
|
|
209
|
+
'rank_paths_by_energy',
|
|
210
|
+
'check_energy_conservation',
|
|
211
|
+
'fresnel_transmittances_tool',
|
|
212
|
+
'tir_analysis_tool',
|
|
213
|
+
# Phase 3: Render result layer
|
|
214
|
+
'save_render',
|
|
215
|
+
'reset_render_counter',
|
|
216
|
+
'create_database',
|
|
217
|
+
'find_rays_inside_glass_xml',
|
|
218
|
+
'find_rays_crossing_edge_xml',
|
|
219
|
+
'find_rays_by_angle_to_edge_xml',
|
|
220
|
+
'find_rays_by_polarization_xml',
|
|
221
|
+
# Phase 3: SVG rendering tools
|
|
222
|
+
'render_scene_svg',
|
|
223
|
+
'highlight_rays_inside_glass_svg',
|
|
224
|
+
'highlight_rays_crossing_edge_svg',
|
|
225
|
+
'highlight_rays_by_polarization_svg',
|
|
226
|
+
'highlight_custom_rays_svg',
|
|
227
|
+
]
|
|
228
|
+
|