Lock: Targets clearen bei Disable + Wendel-Sweep clamp auf 2π
This commit is contained in:
@@ -12298,6 +12298,10 @@ class ElementeBridge(panel_base.BaseBridge):
|
||||
_g = axis_obj.Geometry
|
||||
cur_axis_L = float(_g.GetLength()) if isinstance(_g, rg.Curve) else 0.0
|
||||
except Exception: cur_axis_L = 0.0
|
||||
# Lock disable: Targets clearen damit Reaktivierung frisch faengt
|
||||
if "lockS" in p and not bool(p.get("lockS")):
|
||||
ttarget_s = 0.0
|
||||
ttarget_a = 0.0
|
||||
if "lockS" in p and bool(p.get("lockS")) and old_target_s <= 1e-6:
|
||||
gs_now = _geschoss_by_id(doc, gstart)
|
||||
uk_now = float(gs_now.get("okff", 0.0)) if gs_now else 0.0
|
||||
@@ -12409,6 +12413,11 @@ class ElementeBridge(panel_base.BaseBridge):
|
||||
if abs(cur_arc - new_total_L) > 1e-4:
|
||||
sign = 1.0 if delta_cur > 0 else -1.0
|
||||
new_delta = sign * (new_total_L / r_mid)
|
||||
# Clamp: max 1 Umdrehung (2π)
|
||||
_max = 2 * _m.pi - 0.05
|
||||
if abs(new_delta) > _max:
|
||||
new_delta = sign * _max
|
||||
print("[ELEMENTE] Wendel-Lock: Sweep auf 2π geclamped")
|
||||
a_end_new = a_start_cur + new_delta
|
||||
pend_n = rg.Point3d(
|
||||
center.X + r_click * _m.cos(a_end_new),
|
||||
|
||||
Reference in New Issue
Block a user