trenchfoot 0.2.2__py3-none-any.whl → 0.2.3__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.
Potentially problematic release.
This version of trenchfoot might be problematic. Click here for more details.
- trenchfoot/trench_scene_generator_v3.py +12 -24
- {trenchfoot-0.2.2.dist-info → trenchfoot-0.2.3.dist-info}/METADATA +1 -1
- {trenchfoot-0.2.2.dist-info → trenchfoot-0.2.3.dist-info}/RECORD +6 -6
- {trenchfoot-0.2.2.dist-info → trenchfoot-0.2.3.dist-info}/WHEEL +0 -0
- {trenchfoot-0.2.2.dist-info → trenchfoot-0.2.3.dist-info}/entry_points.txt +0 -0
- {trenchfoot-0.2.2.dist-info → trenchfoot-0.2.3.dist-info}/licenses/LICENSE +0 -0
|
@@ -128,6 +128,7 @@ def _offset_closed_polyline(path: List[Tuple[float,float]], offset: float) -> Li
|
|
|
128
128
|
raise ValueError("Closed polyline needs at least 3 points")
|
|
129
129
|
|
|
130
130
|
# Compute tangents treating path as closed loop
|
|
131
|
+
# For CCW-oriented polygons, use CW rotation to get outward-pointing normals
|
|
131
132
|
tangents = []
|
|
132
133
|
normals = []
|
|
133
134
|
for i in range(n):
|
|
@@ -135,7 +136,7 @@ def _offset_closed_polyline(path: List[Tuple[float,float]], offset: float) -> Li
|
|
|
135
136
|
if np.linalg.norm(t) < 1e-12:
|
|
136
137
|
t = np.array([1.0, 0.0])
|
|
137
138
|
tangents.append(t)
|
|
138
|
-
normals.append(
|
|
139
|
+
normals.append(_rotate_cw(t)) # CW rotation gives outward normal for CCW polygon
|
|
139
140
|
|
|
140
141
|
# Compute offset points with proper miter at each vertex
|
|
141
142
|
offset_pts = []
|
|
@@ -763,8 +764,8 @@ def make_ground_surface_plane(path_xy: List[Tuple[float,float]], width_top: floa
|
|
|
763
764
|
the trench opening as an open hole. This creates a natural shape that
|
|
764
765
|
hugs L-shaped, U-shaped, and curved trenches.
|
|
765
766
|
|
|
766
|
-
For closed paths (like circles),
|
|
767
|
-
|
|
767
|
+
For closed paths (like circles), the ground surface is a ring around the
|
|
768
|
+
outer edge of the trench, with the trench opening left completely open.
|
|
768
769
|
"""
|
|
769
770
|
half_top = width_top / 2.0
|
|
770
771
|
m = float(max(0.5, ground.size_margin))
|
|
@@ -772,36 +773,23 @@ def make_ground_surface_plane(path_xy: List[Tuple[float,float]], width_top: floa
|
|
|
772
773
|
is_closed = _is_path_closed(path_xy)
|
|
773
774
|
|
|
774
775
|
if is_closed:
|
|
775
|
-
# For closed paths,
|
|
776
|
-
#
|
|
777
|
-
#
|
|
776
|
+
# For closed paths (like circular wells), the ground is an annulus
|
|
777
|
+
# from the outer ground boundary to the outer edge of the trench opening.
|
|
778
|
+
# The center (inside the trench) is left completely open.
|
|
778
779
|
|
|
779
|
-
# Trench
|
|
780
|
+
# Trench outer boundary (edge of trench opening)
|
|
780
781
|
trench_outer = np.array(_offset_closed_polyline(path_xy, half_top), float)
|
|
781
|
-
trench_inner = np.array(_offset_closed_polyline(path_xy, -half_top), float)
|
|
782
782
|
|
|
783
|
-
# Ground outer boundary
|
|
783
|
+
# Ground outer boundary (edge of ground surface)
|
|
784
784
|
ground_outer = np.array(_offset_closed_polyline(path_xy, half_top + m), float)
|
|
785
785
|
|
|
786
786
|
# Ensure proper orientations
|
|
787
787
|
trench_outer = _ensure_ccw(trench_outer)
|
|
788
|
-
trench_inner = _ensure_ccw(trench_inner)
|
|
789
788
|
ground_outer = _ensure_ccw(ground_outer)
|
|
790
789
|
|
|
791
|
-
#
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
# Center island (simple filled polygon)
|
|
796
|
-
center_tris = _ear_clipping_triangulation(trench_inner)
|
|
797
|
-
center_Vg = np.array([[x, y, gfun(x, y)] for (x, y) in trench_inner], float)
|
|
798
|
-
|
|
799
|
-
# Combine into single ground surface
|
|
800
|
-
n_outer_verts = len(outer_Vg)
|
|
801
|
-
center_tris_offset = center_tris + n_outer_verts
|
|
802
|
-
|
|
803
|
-
Vg = np.vstack([outer_Vg, center_Vg])
|
|
804
|
-
tris = np.vstack([outer_tris, center_tris_offset])
|
|
790
|
+
# Ground annulus: from ground_outer to trench_outer
|
|
791
|
+
combined_xy, tris = _triangulate_annulus(ground_outer, trench_outer)
|
|
792
|
+
Vg = np.array([[x, y, gfun(x, y)] for (x, y) in combined_xy], float)
|
|
805
793
|
|
|
806
794
|
return {"ground_surface": (Vg, tris)}
|
|
807
795
|
else:
|
|
@@ -6,7 +6,7 @@ trenchfoot/gmsh_sloped_trench_mesher.py,sha256=D7EL6V0wkE6tvDARmm006yZE6KEzCl25O
|
|
|
6
6
|
trenchfoot/plot_mesh.py,sha256=26dOlVfaM1WsUfr_sXVqA7axtY9qjY3WCNM7cUBTS7Q,3810
|
|
7
7
|
trenchfoot/render_colors.py,sha256=EfldvoshgaZ6iZFk-UDL67-tvwGYaiZFS2NQZBMwhDM,1596
|
|
8
8
|
trenchfoot/scene_spec_example.json,sha256=UcV25ku422UO0ZZPDrJwrT1zwmjoOIpnBdLuEdh-AZA,1028
|
|
9
|
-
trenchfoot/trench_scene_generator_v3.py,sha256=
|
|
9
|
+
trenchfoot/trench_scene_generator_v3.py,sha256=AbTQ90yOtEtVaKysItDRYQ595vIPZVQqpFGkU850Opc,43031
|
|
10
10
|
trenchfoot/scenarios/SUMMARY.json,sha256=PUT7ID4nl5BJ6A0M3MhbOkx5bm2HAy0Gwzq8cc6JBAE,18492
|
|
11
11
|
trenchfoot/scenarios/S01_straight_vwalls/metrics.json,sha256=_AoK-WCgTKKdu_zUJL-HiSnsxMJvr6GDxlet7Ojmtk4,691
|
|
12
12
|
trenchfoot/scenarios/S01_straight_vwalls/preview.png,sha256=adsx3-6oMu9WaixggXRhuXi_KM-q5s2RNSBLR_stq80,199624
|
|
@@ -71,8 +71,8 @@ trenchfoot/scenarios/S07_circular_well/preview_top.png,sha256=XW7DQLDEYmSV6Lnfo1
|
|
|
71
71
|
trenchfoot/scenarios/S07_circular_well/scene.json,sha256=bvror2YX6aNbsEc25-N7JO3ysH2dTLGyEE6zGzZysXQ,3146
|
|
72
72
|
trenchfoot/scenarios/S07_circular_well/trench_scene.obj,sha256=1MAsyGkJ4-tCRXLDWi_7ruumgpCpcl_Ca5poRLtTua0,1619846
|
|
73
73
|
trenchfoot/scenarios/S07_circular_well/volumetric/trench_volume.msh,sha256=dqhtd3SFKj5RLT_BcWIIvVGCbAqvOx7RX25-K7NKX10,615212
|
|
74
|
-
trenchfoot-0.2.
|
|
75
|
-
trenchfoot-0.2.
|
|
76
|
-
trenchfoot-0.2.
|
|
77
|
-
trenchfoot-0.2.
|
|
78
|
-
trenchfoot-0.2.
|
|
74
|
+
trenchfoot-0.2.3.dist-info/METADATA,sha256=kbpaAePYuk_SrbL1xgQGn3lT-gZpFhX1G9Lb62Y1krI,5292
|
|
75
|
+
trenchfoot-0.2.3.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
|
|
76
|
+
trenchfoot-0.2.3.dist-info/entry_points.txt,sha256=5TejAGmc4GnNYLn7MhhLtSCNz9240RvzcNaetF4IHfg,119
|
|
77
|
+
trenchfoot-0.2.3.dist-info/licenses/LICENSE,sha256=hIahDEOTzuHCU5J2nd07LWwkLW7Hko4UFO__ffsvB-8,34523
|
|
78
|
+
trenchfoot-0.2.3.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|