trenchfoot 0.2.3__tar.gz → 0.2.4__tar.gz
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.
Potentially problematic release.
This version of trenchfoot might be problematic. Click here for more details.
- {trenchfoot-0.2.3 → trenchfoot-0.2.4}/CHANGELOG.md +5 -0
- {trenchfoot-0.2.3 → trenchfoot-0.2.4}/PKG-INFO +1 -1
- {trenchfoot-0.2.3 → trenchfoot-0.2.4}/packages/trenchfoot/trench_scene_generator_v3.py +63 -3
- {trenchfoot-0.2.3 → trenchfoot-0.2.4}/pyproject.toml +1 -1
- {trenchfoot-0.2.3 → trenchfoot-0.2.4}/uv.lock +1 -1
- {trenchfoot-0.2.3 → trenchfoot-0.2.4}/.env +0 -0
- {trenchfoot-0.2.3 → trenchfoot-0.2.4}/.github/workflows/ci.yml +0 -0
- {trenchfoot-0.2.3 → trenchfoot-0.2.4}/.github_token.env +0 -0
- {trenchfoot-0.2.3 → trenchfoot-0.2.4}/CLAUDE.md +0 -0
- {trenchfoot-0.2.3 → trenchfoot-0.2.4}/LICENSE +0 -0
- {trenchfoot-0.2.3 → trenchfoot-0.2.4}/README.md +0 -0
- {trenchfoot-0.2.3 → trenchfoot-0.2.4}/STATUS.md +0 -0
- {trenchfoot-0.2.3 → trenchfoot-0.2.4}/docs/scenario_gallery.md +0 -0
- {trenchfoot-0.2.3 → trenchfoot-0.2.4}/packages/__init__.py +0 -0
- {trenchfoot-0.2.3 → trenchfoot-0.2.4}/packages/trenchfoot/Dockerfile +0 -0
- {trenchfoot-0.2.3 → trenchfoot-0.2.4}/packages/trenchfoot/README.md +0 -0
- {trenchfoot-0.2.3 → trenchfoot-0.2.4}/packages/trenchfoot/__init__.py +0 -0
- {trenchfoot-0.2.3 → trenchfoot-0.2.4}/packages/trenchfoot/generate_scenarios.py +0 -0
- {trenchfoot-0.2.3 → trenchfoot-0.2.4}/packages/trenchfoot/gmsh_sloped_trench_mesher.py +0 -0
- {trenchfoot-0.2.3 → trenchfoot-0.2.4}/packages/trenchfoot/plot_mesh.py +0 -0
- {trenchfoot-0.2.3 → trenchfoot-0.2.4}/packages/trenchfoot/render_colors.py +0 -0
- {trenchfoot-0.2.3 → trenchfoot-0.2.4}/packages/trenchfoot/scenarios/S01_straight_vwalls/meshes/trench_scene_culled.obj +0 -0
- {trenchfoot-0.2.3 → trenchfoot-0.2.4}/packages/trenchfoot/scenarios/S01_straight_vwalls/metrics.json +0 -0
- {trenchfoot-0.2.3 → trenchfoot-0.2.4}/packages/trenchfoot/scenarios/S01_straight_vwalls/point_clouds/culled/resolution0p050.pth +0 -0
- {trenchfoot-0.2.3 → trenchfoot-0.2.4}/packages/trenchfoot/scenarios/S01_straight_vwalls/point_clouds/full/resolution0p050.pth +0 -0
- {trenchfoot-0.2.3 → trenchfoot-0.2.4}/packages/trenchfoot/scenarios/S01_straight_vwalls/preview.png +0 -0
- {trenchfoot-0.2.3 → trenchfoot-0.2.4}/packages/trenchfoot/scenarios/S01_straight_vwalls/preview_oblique.png +0 -0
- {trenchfoot-0.2.3 → trenchfoot-0.2.4}/packages/trenchfoot/scenarios/S01_straight_vwalls/preview_side.png +0 -0
- {trenchfoot-0.2.3 → trenchfoot-0.2.4}/packages/trenchfoot/scenarios/S01_straight_vwalls/preview_top.png +0 -0
- {trenchfoot-0.2.3 → trenchfoot-0.2.4}/packages/trenchfoot/scenarios/S01_straight_vwalls/scene.json +0 -0
- {trenchfoot-0.2.3 → trenchfoot-0.2.4}/packages/trenchfoot/scenarios/S01_straight_vwalls/trench_scene.obj +0 -0
- {trenchfoot-0.2.3 → trenchfoot-0.2.4}/packages/trenchfoot/scenarios/S01_straight_vwalls/volumetric/trench_volume.msh +0 -0
- {trenchfoot-0.2.3 → trenchfoot-0.2.4}/packages/trenchfoot/scenarios/S02_straight_slope_pipe/meshes/trench_scene_culled.obj +0 -0
- {trenchfoot-0.2.3 → trenchfoot-0.2.4}/packages/trenchfoot/scenarios/S02_straight_slope_pipe/metrics.json +0 -0
- {trenchfoot-0.2.3 → trenchfoot-0.2.4}/packages/trenchfoot/scenarios/S02_straight_slope_pipe/point_clouds/culled/resolution0p050.pth +0 -0
- {trenchfoot-0.2.3 → trenchfoot-0.2.4}/packages/trenchfoot/scenarios/S02_straight_slope_pipe/point_clouds/full/resolution0p050.pth +0 -0
- {trenchfoot-0.2.3 → trenchfoot-0.2.4}/packages/trenchfoot/scenarios/S02_straight_slope_pipe/preview.png +0 -0
- {trenchfoot-0.2.3 → trenchfoot-0.2.4}/packages/trenchfoot/scenarios/S02_straight_slope_pipe/preview_oblique.png +0 -0
- {trenchfoot-0.2.3 → trenchfoot-0.2.4}/packages/trenchfoot/scenarios/S02_straight_slope_pipe/preview_side.png +0 -0
- {trenchfoot-0.2.3 → trenchfoot-0.2.4}/packages/trenchfoot/scenarios/S02_straight_slope_pipe/preview_top.png +0 -0
- {trenchfoot-0.2.3 → trenchfoot-0.2.4}/packages/trenchfoot/scenarios/S02_straight_slope_pipe/scene.json +0 -0
- {trenchfoot-0.2.3 → trenchfoot-0.2.4}/packages/trenchfoot/scenarios/S02_straight_slope_pipe/trench_scene.obj +0 -0
- {trenchfoot-0.2.3 → trenchfoot-0.2.4}/packages/trenchfoot/scenarios/S02_straight_slope_pipe/volumetric/trench_volume.msh +0 -0
- {trenchfoot-0.2.3 → trenchfoot-0.2.4}/packages/trenchfoot/scenarios/S03_L_slope_two_pipes_box/meshes/trench_scene_culled.obj +0 -0
- {trenchfoot-0.2.3 → trenchfoot-0.2.4}/packages/trenchfoot/scenarios/S03_L_slope_two_pipes_box/metrics.json +0 -0
- {trenchfoot-0.2.3 → trenchfoot-0.2.4}/packages/trenchfoot/scenarios/S03_L_slope_two_pipes_box/point_clouds/culled/resolution0p050.pth +0 -0
- {trenchfoot-0.2.3 → trenchfoot-0.2.4}/packages/trenchfoot/scenarios/S03_L_slope_two_pipes_box/point_clouds/full/resolution0p050.pth +0 -0
- {trenchfoot-0.2.3 → trenchfoot-0.2.4}/packages/trenchfoot/scenarios/S03_L_slope_two_pipes_box/preview.png +0 -0
- {trenchfoot-0.2.3 → trenchfoot-0.2.4}/packages/trenchfoot/scenarios/S03_L_slope_two_pipes_box/preview_oblique.png +0 -0
- {trenchfoot-0.2.3 → trenchfoot-0.2.4}/packages/trenchfoot/scenarios/S03_L_slope_two_pipes_box/preview_side.png +0 -0
- {trenchfoot-0.2.3 → trenchfoot-0.2.4}/packages/trenchfoot/scenarios/S03_L_slope_two_pipes_box/preview_top.png +0 -0
- {trenchfoot-0.2.3 → trenchfoot-0.2.4}/packages/trenchfoot/scenarios/S03_L_slope_two_pipes_box/scene.json +0 -0
- {trenchfoot-0.2.3 → trenchfoot-0.2.4}/packages/trenchfoot/scenarios/S03_L_slope_two_pipes_box/trench_scene.obj +0 -0
- {trenchfoot-0.2.3 → trenchfoot-0.2.4}/packages/trenchfoot/scenarios/S03_L_slope_two_pipes_box/volumetric/trench_volume.msh +0 -0
- {trenchfoot-0.2.3 → trenchfoot-0.2.4}/packages/trenchfoot/scenarios/S04_U_slope_multi_noise/meshes/trench_scene_culled.obj +0 -0
- {trenchfoot-0.2.3 → trenchfoot-0.2.4}/packages/trenchfoot/scenarios/S04_U_slope_multi_noise/metrics.json +0 -0
- {trenchfoot-0.2.3 → trenchfoot-0.2.4}/packages/trenchfoot/scenarios/S04_U_slope_multi_noise/preview.png +0 -0
- {trenchfoot-0.2.3 → trenchfoot-0.2.4}/packages/trenchfoot/scenarios/S04_U_slope_multi_noise/preview_oblique.png +0 -0
- {trenchfoot-0.2.3 → trenchfoot-0.2.4}/packages/trenchfoot/scenarios/S04_U_slope_multi_noise/preview_side.png +0 -0
- {trenchfoot-0.2.3 → trenchfoot-0.2.4}/packages/trenchfoot/scenarios/S04_U_slope_multi_noise/preview_top.png +0 -0
- {trenchfoot-0.2.3 → trenchfoot-0.2.4}/packages/trenchfoot/scenarios/S04_U_slope_multi_noise/scene.json +0 -0
- {trenchfoot-0.2.3 → trenchfoot-0.2.4}/packages/trenchfoot/scenarios/S04_U_slope_multi_noise/trench_scene.obj +0 -0
- {trenchfoot-0.2.3 → trenchfoot-0.2.4}/packages/trenchfoot/scenarios/S04_U_slope_multi_noise/volumetric/trench_volume.msh +0 -0
- {trenchfoot-0.2.3 → trenchfoot-0.2.4}/packages/trenchfoot/scenarios/S05_wide_slope_pair/metrics.json +0 -0
- {trenchfoot-0.2.3 → trenchfoot-0.2.4}/packages/trenchfoot/scenarios/S05_wide_slope_pair/preview_oblique.png +0 -0
- {trenchfoot-0.2.3 → trenchfoot-0.2.4}/packages/trenchfoot/scenarios/S05_wide_slope_pair/preview_side.png +0 -0
- {trenchfoot-0.2.3 → trenchfoot-0.2.4}/packages/trenchfoot/scenarios/S05_wide_slope_pair/preview_top.png +0 -0
- {trenchfoot-0.2.3 → trenchfoot-0.2.4}/packages/trenchfoot/scenarios/S05_wide_slope_pair/scene.json +0 -0
- {trenchfoot-0.2.3 → trenchfoot-0.2.4}/packages/trenchfoot/scenarios/S05_wide_slope_pair/trench_scene.obj +0 -0
- {trenchfoot-0.2.3 → trenchfoot-0.2.4}/packages/trenchfoot/scenarios/S05_wide_slope_pair/volumetric/trench_volume.msh +0 -0
- {trenchfoot-0.2.3 → trenchfoot-0.2.4}/packages/trenchfoot/scenarios/S06_bumpy_wide_loop/metrics.json +0 -0
- {trenchfoot-0.2.3 → trenchfoot-0.2.4}/packages/trenchfoot/scenarios/S06_bumpy_wide_loop/preview_oblique.png +0 -0
- {trenchfoot-0.2.3 → trenchfoot-0.2.4}/packages/trenchfoot/scenarios/S06_bumpy_wide_loop/preview_side.png +0 -0
- {trenchfoot-0.2.3 → trenchfoot-0.2.4}/packages/trenchfoot/scenarios/S06_bumpy_wide_loop/preview_top.png +0 -0
- {trenchfoot-0.2.3 → trenchfoot-0.2.4}/packages/trenchfoot/scenarios/S06_bumpy_wide_loop/scene.json +0 -0
- {trenchfoot-0.2.3 → trenchfoot-0.2.4}/packages/trenchfoot/scenarios/S06_bumpy_wide_loop/trench_scene.obj +0 -0
- {trenchfoot-0.2.3 → trenchfoot-0.2.4}/packages/trenchfoot/scenarios/S06_bumpy_wide_loop/volumetric/trench_volume.msh +0 -0
- {trenchfoot-0.2.3 → trenchfoot-0.2.4}/packages/trenchfoot/scenarios/S07_circular_well/metrics.json +0 -0
- {trenchfoot-0.2.3 → trenchfoot-0.2.4}/packages/trenchfoot/scenarios/S07_circular_well/preview_oblique.png +0 -0
- {trenchfoot-0.2.3 → trenchfoot-0.2.4}/packages/trenchfoot/scenarios/S07_circular_well/preview_side.png +0 -0
- {trenchfoot-0.2.3 → trenchfoot-0.2.4}/packages/trenchfoot/scenarios/S07_circular_well/preview_top.png +0 -0
- {trenchfoot-0.2.3 → trenchfoot-0.2.4}/packages/trenchfoot/scenarios/S07_circular_well/scene.json +0 -0
- {trenchfoot-0.2.3 → trenchfoot-0.2.4}/packages/trenchfoot/scenarios/S07_circular_well/trench_scene.obj +0 -0
- {trenchfoot-0.2.3 → trenchfoot-0.2.4}/packages/trenchfoot/scenarios/S07_circular_well/volumetric/trench_volume.msh +0 -0
- {trenchfoot-0.2.3 → trenchfoot-0.2.4}/packages/trenchfoot/scenarios/SUMMARY.json +0 -0
- {trenchfoot-0.2.3 → trenchfoot-0.2.4}/packages/trenchfoot/scene_spec_example.json +0 -0
- {trenchfoot-0.2.3 → trenchfoot-0.2.4}/tests/test_trenchfoot_generation.py +0 -0
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.2.4] - 2025-12-24
|
|
4
|
+
|
|
5
|
+
### Added
|
|
6
|
+
- **Ground end caps**: For open-path trenches, the ground surface now extends past the trench endpoints with semicircular caps, providing a buffer of ground at each end instead of terminating abruptly.
|
|
7
|
+
|
|
3
8
|
## [0.2.3] - 2025-12-20
|
|
4
9
|
|
|
5
10
|
### Fixed
|
|
@@ -547,6 +547,64 @@ def make_sphere(center: np.ndarray, radius: float, n_theta: int=48, n_phi: int=2
|
|
|
547
547
|
def _ring_from_LR(L: List[np.ndarray], R: List[np.ndarray]) -> np.ndarray:
|
|
548
548
|
return np.array(L + list(R[::-1]), float)
|
|
549
549
|
|
|
550
|
+
|
|
551
|
+
def _ring_from_LR_with_end_caps(
|
|
552
|
+
L: List[np.ndarray], R: List[np.ndarray],
|
|
553
|
+
path_xy: List[Tuple[float, float]], end_extension: float, n_cap_points: int = 5
|
|
554
|
+
) -> np.ndarray:
|
|
555
|
+
"""Create a ring from L/R offsets with semicircular end caps.
|
|
556
|
+
|
|
557
|
+
Extends the outer boundary past the path endpoints to create ground buffer
|
|
558
|
+
at the ends of open trenches.
|
|
559
|
+
"""
|
|
560
|
+
P = np.array(path_xy, float)
|
|
561
|
+
|
|
562
|
+
# Get tangent directions at endpoints
|
|
563
|
+
t_start = _normalize(P[1] - P[0])
|
|
564
|
+
t_end = _normalize(P[-1] - P[-2])
|
|
565
|
+
|
|
566
|
+
# Start cap: semicircle from R[0] around to L[0], extending in -t_start direction
|
|
567
|
+
# Center of cap is at path start, offset backward by end_extension
|
|
568
|
+
cap_center_start = P[0] - end_extension * t_start
|
|
569
|
+
# Radius is distance from center to L[0] or R[0]
|
|
570
|
+
radius_start = np.linalg.norm(np.array(L[0]) - cap_center_start)
|
|
571
|
+
|
|
572
|
+
# Generate semicircle points from R[0] to L[0] going around the back
|
|
573
|
+
# R[0] is at angle theta_r, L[0] is at angle theta_l
|
|
574
|
+
# We go from theta_r counterclockwise to theta_l (the long way around the back)
|
|
575
|
+
vec_r = np.array(R[0]) - cap_center_start
|
|
576
|
+
vec_l = np.array(L[0]) - cap_center_start
|
|
577
|
+
theta_r = np.arctan2(vec_r[1], vec_r[0])
|
|
578
|
+
theta_l = np.arctan2(vec_l[1], vec_l[0])
|
|
579
|
+
|
|
580
|
+
# Ensure we go the "back" way (counterclockwise from R to L)
|
|
581
|
+
if theta_l > theta_r:
|
|
582
|
+
theta_l -= 2 * np.pi
|
|
583
|
+
|
|
584
|
+
angles_start = np.linspace(theta_r, theta_l, n_cap_points + 2)[1:-1] # Exclude endpoints (already have R[0], L[0])
|
|
585
|
+
cap_start = [cap_center_start + radius_start * np.array([np.cos(a), np.sin(a)]) for a in angles_start]
|
|
586
|
+
|
|
587
|
+
# End cap: semicircle from L[-1] around to R[-1], extending in +t_end direction
|
|
588
|
+
cap_center_end = P[-1] + end_extension * t_end
|
|
589
|
+
radius_end = np.linalg.norm(np.array(L[-1]) - cap_center_end)
|
|
590
|
+
|
|
591
|
+
vec_l_end = np.array(L[-1]) - cap_center_end
|
|
592
|
+
vec_r_end = np.array(R[-1]) - cap_center_end
|
|
593
|
+
theta_l_end = np.arctan2(vec_l_end[1], vec_l_end[0])
|
|
594
|
+
theta_r_end = np.arctan2(vec_r_end[1], vec_r_end[0])
|
|
595
|
+
|
|
596
|
+
# Go counterclockwise from L[-1] to R[-1] (the back way)
|
|
597
|
+
if theta_r_end > theta_l_end:
|
|
598
|
+
theta_r_end -= 2 * np.pi
|
|
599
|
+
|
|
600
|
+
angles_end = np.linspace(theta_l_end, theta_r_end, n_cap_points + 2)[1:-1]
|
|
601
|
+
cap_end = [cap_center_end + radius_end * np.array([np.cos(a), np.sin(a)]) for a in angles_end]
|
|
602
|
+
|
|
603
|
+
# Build the full ring: L + end_cap + R_reversed + start_cap
|
|
604
|
+
ring_points = list(L) + cap_end + list(R[::-1]) + cap_start
|
|
605
|
+
|
|
606
|
+
return np.array(ring_points, float)
|
|
607
|
+
|
|
550
608
|
def make_trench_from_path_sloped(path_xy: List[Tuple[float,float]], width_top: float, depth: float, wall_slope: float, ground) -> Tuple[Dict,str,str,dict]:
|
|
551
609
|
# Build top and bottom rings by offsetting centerline
|
|
552
610
|
half_top = width_top/2.0
|
|
@@ -793,14 +851,16 @@ def make_ground_surface_plane(path_xy: List[Tuple[float,float]], width_top: floa
|
|
|
793
851
|
|
|
794
852
|
return {"ground_surface": (Vg, tris)}
|
|
795
853
|
else:
|
|
796
|
-
#
|
|
854
|
+
# Open paths: ground forms annulus with end caps extending past trench endpoints
|
|
797
855
|
# Inner boundary: the trench opening (same as trench top ring)
|
|
798
856
|
L_inner, R_inner = _offset_polyline(path_xy, half_top)
|
|
799
857
|
inner_ring = _ensure_ccw(_ring_from_LR(L_inner, R_inner))
|
|
800
858
|
|
|
801
|
-
# Outer boundary: offset by additional margin
|
|
859
|
+
# Outer boundary: offset by additional margin, with semicircular end caps
|
|
802
860
|
L_outer, R_outer = _offset_polyline(path_xy, half_top + m)
|
|
803
|
-
outer_ring = _ensure_ccw(
|
|
861
|
+
outer_ring = _ensure_ccw(_ring_from_LR_with_end_caps(
|
|
862
|
+
L_outer, R_outer, path_xy, end_extension=m
|
|
863
|
+
))
|
|
804
864
|
|
|
805
865
|
# Triangulate the annular region (leaves hole open)
|
|
806
866
|
combined_xy, tris = _triangulate_annulus(outer_ring, inner_ring)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{trenchfoot-0.2.3 → trenchfoot-0.2.4}/packages/trenchfoot/scenarios/S01_straight_vwalls/metrics.json
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{trenchfoot-0.2.3 → trenchfoot-0.2.4}/packages/trenchfoot/scenarios/S01_straight_vwalls/preview.png
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{trenchfoot-0.2.3 → trenchfoot-0.2.4}/packages/trenchfoot/scenarios/S01_straight_vwalls/scene.json
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{trenchfoot-0.2.3 → trenchfoot-0.2.4}/packages/trenchfoot/scenarios/S05_wide_slope_pair/metrics.json
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{trenchfoot-0.2.3 → trenchfoot-0.2.4}/packages/trenchfoot/scenarios/S05_wide_slope_pair/scene.json
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{trenchfoot-0.2.3 → trenchfoot-0.2.4}/packages/trenchfoot/scenarios/S06_bumpy_wide_loop/metrics.json
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{trenchfoot-0.2.3 → trenchfoot-0.2.4}/packages/trenchfoot/scenarios/S06_bumpy_wide_loop/scene.json
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{trenchfoot-0.2.3 → trenchfoot-0.2.4}/packages/trenchfoot/scenarios/S07_circular_well/metrics.json
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{trenchfoot-0.2.3 → trenchfoot-0.2.4}/packages/trenchfoot/scenarios/S07_circular_well/scene.json
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|