Skip to content

Commit 87fbafa

Browse files
committed
chore: edit some comments
1 parent cd5c0dc commit 87fbafa

2 files changed

Lines changed: 4 additions & 8 deletions

File tree

optimize/angle_based_smoothing.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ def angle_based_smoothing(unstr_grid, iterations=1):
165165
vvm_pos = node_coords_2d[vvm_idx] # Current neighbor
166166
vvn_pos = node_coords_2d[vvn_idx] # Next neighbor
167167

168-
# 以 vvm 为旋转中心构造向量(与 smoothing.cpp 一致)
168+
# 以 vvm 为旋转中心构造向量
169169
v = curr_node_pos - vvm_pos # Vector from vvm to current node
170170
v1 = vvp_pos - vvm_pos # Vector from vvm to vvp
171171
v2 = vvn_pos - vvm_pos # Vector from vvm to vvn
@@ -294,7 +294,7 @@ def smart_angle_based_smoothing(unstr_grid, iterations=1):
294294
vvm_pos = node_coords_2d[vvm_idx] # Current neighbor
295295
vvn_pos = node_coords_2d[vvn_idx] # Next neighbor
296296

297-
# 以 vvm 为旋转中心构造向量(与 smoothing.cpp 一致)
297+
# 以 vvm 为旋转中心构造向量
298298
v = curr_node_pos - vvm_pos # Vector from vvm to current node
299299
v1 = vvp_pos - vvm_pos # Vector from vvm to vvp
300300
v2 = vvn_pos - vvm_pos # Vector from vvm to vvn
@@ -421,7 +421,7 @@ def getme_method(unstr_grid, iterations=1):
421421
if area_before <= 0 or quality_before <= 0:
422422
continue
423423

424-
# Apply transformation to get new triangle (match smoothing.cpp formulas)
424+
# Apply transformation to get new triangle
425425
y1 = np.array([
426426
(p1[0] + p3[0]) / 2.0 + np.sqrt(3.0) / 2.0 * (p1[1] - p3[1]),
427427
(p1[1] + p3[1]) / 2.0 + np.sqrt(3.0) / 2.0 * (p3[0] - p1[0]),

sfmesh/mesh_3d_afm.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2509,8 +2509,6 @@ def _trim_front(self, front: SurfaceFront) -> bool:
25092509
"""
25102510
阵面修剪:当阵面端点角度很小时,直接连接到相邻阵面的节点。
25112511
2512-
参考 C++ su_aft.cpp:2655-2734 (get_trim_nodes + trim_front)
2513-
25142512
通过 edge_count 查找边界邻居,避免遍历整个 front_list。
25152513
25162514
Args:
@@ -2601,8 +2599,6 @@ def _close_simple_front(self, front: SurfaceFront) -> bool:
26012599
"""
26022600
闭合简单阵面:当端点有边界邻居时,尝试闭合为三角形。
26032601
2604-
参考 C++ su_aft.cpp:2595-2653 (close_simple_front)
2605-
26062602
通过 edge_count 查找边界邻居,避免遍历整个 front_list。
26072603
26082604
Args:
@@ -2639,7 +2635,7 @@ def _close_simple_front(self, front: SurfaceFront) -> bool:
26392635

26402636
def _get_subdiv_node(self, front: SurfaceFront) -> Optional[NodeElement3D]:
26412637
"""
2642-
在多个距离处尝试创建试探节点(参考 C++ su_aft.cpp:2481-2553 get_subdiv_node)
2638+
在多个距离处尝试创建试探节点
26432639
26442640
沿垂直方向在多个距离处创建节点,投影到曲面,返回第一个有效的。
26452641

0 commit comments

Comments
 (0)