修改了一些之前增加功能的bug
This commit is contained in:
@@ -110,11 +110,12 @@ def _build_z_aligned(spec: ThreadSpec) -> Solid:
|
||||
# material; the crest centre sits at the helix start phase (z = 0), which
|
||||
# also puts the z = 0 end face through full crest material after trimming.
|
||||
helix_height = spec.length_mm + 2.0 * pitch
|
||||
helix = Edge.make_helix(
|
||||
pitch=pitch,
|
||||
height=helix_height,
|
||||
radius=root_radius,
|
||||
lefthand=spec.lefthand,
|
||||
# 复用 adapter 门面构造螺旋路径与扫掠。函数级延迟导入:build123d_adapter 顶部
|
||||
# 已 import build_thread_solid,模块级反向 import adapter 会形成循环依赖。
|
||||
from .build123d_adapter import Build123dGeometryAdapter
|
||||
|
||||
helix = Build123dGeometryAdapter.helix_path(
|
||||
root_radius, pitch, height_mm=helix_height, lefthand=spec.lefthand,
|
||||
)
|
||||
|
||||
# Profile vertices (z, r) -> world (x = r, y = 0, z). Order is counter
|
||||
@@ -130,7 +131,7 @@ def _build_z_aligned(spec: ThreadSpec) -> Solid:
|
||||
]
|
||||
wire = Wire([Edge.make_line(pts[index], pts[(index + 1) % len(pts)]) for index in range(len(pts))])
|
||||
wire = _apply_profile_fillets(wire, spec, crest_radius, sunk_root, pitch, crest_half_width)
|
||||
ribbon = Solid.sweep(section=Face(wire), path=helix, make_solid=True, is_frenet=True)
|
||||
ribbon = Build123dGeometryAdapter.sweep(Face(wire), helix, make_solid=True, is_frenet=True)
|
||||
|
||||
# Core cylinder at the nominal minor radius spanning the whole helix.
|
||||
# (The sunken tooth roots overlap it so the union below is clean.)
|
||||
|
||||
Reference in New Issue
Block a user