Massstab: Diagnose-Prints fuer _apply_scale (pre/post Magnify)
This commit is contained in:
@@ -852,6 +852,10 @@ def _apply_scale(doc, vp, ratio):
|
|||||||
if not ok: return False
|
if not ok: return False
|
||||||
cur_w = (r - l)
|
cur_w = (r - l)
|
||||||
if cur_w <= 0: return False
|
if cur_w <= 0: return False
|
||||||
|
print("[MASSSTAB-DIAG] pw={} dpi={} mm/u={} screen_mm={:.2f} "
|
||||||
|
"new_frustum_mm={:.2f} new_frustum_u={:.4f} cur_w={:.4f} {}".format(
|
||||||
|
pw, dpi, mm_per_u, screen_mm, new_frustum_mm, new_frustum_u,
|
||||||
|
cur_w, str(doc.ModelUnitSystem)))
|
||||||
# RhinoViewport.SetFrustum existiert nicht — wir benutzen Magnify(factor).
|
# RhinoViewport.SetFrustum existiert nicht — wir benutzen Magnify(factor).
|
||||||
# factor > 1 zoomt rein (kleineres Frustum). factor = cur_w / new_w.
|
# factor > 1 zoomt rein (kleineres Frustum). factor = cur_w / new_w.
|
||||||
factor = cur_w / new_frustum_u
|
factor = cur_w / new_frustum_u
|
||||||
@@ -879,6 +883,18 @@ def _apply_scale(doc, vp, ratio):
|
|||||||
ex1, ex2, ex3)
|
ex1, ex2, ex3)
|
||||||
if not applied:
|
if not applied:
|
||||||
return False
|
return False
|
||||||
|
# POST-Magnify: aktuellen Frustum nochmal lesen — wenn Magnify nicht
|
||||||
|
# greift (Mac-Rhino-Edge-Case), sehen wir das hier.
|
||||||
|
try:
|
||||||
|
ok2, l2, r2, b2, t2, n2, f2 = vp.GetFrustum()
|
||||||
|
if ok2:
|
||||||
|
actual_w = (r2 - l2)
|
||||||
|
ratio_actual_target = actual_w / new_frustum_u if new_frustum_u > 0 else 0
|
||||||
|
print("[MASSSTAB-DIAG] Magnify({:.6f}) → actual_w={:.4f} "
|
||||||
|
"(target={:.4f}, ratio actual/target={:.4f})".format(
|
||||||
|
factor, actual_w, new_frustum_u, ratio_actual_target))
|
||||||
|
except Exception as ex:
|
||||||
|
print("[MASSSTAB-DIAG] post-frustum-read:", ex)
|
||||||
# PlotWeights nur skalieren wenn Print-Mode aktiv ist.
|
# PlotWeights nur skalieren wenn Print-Mode aktiv ist.
|
||||||
try:
|
try:
|
||||||
if _get_lineweights_enabled(doc):
|
if _get_lineweights_enabled(doc):
|
||||||
|
|||||||
Reference in New Issue
Block a user