From 1e6bc681564d396e646f2381c0be081214ee091e Mon Sep 17 00:00:00 2001 From: karim Date: Wed, 20 May 2026 00:51:02 +0200 Subject: [PATCH] Ortho-PictureFrame Position: Plane-Origin als Bottom-Left (statt Center) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit AddPictureFrame interpretiert plane.Origin als BOTTOM-LEFT corner, nicht als Zentrum — width geht in +X, height in +Y vom Origin aus. Mit Center- basierter Plane landete die Picture um (width/2, height/2) verschoben nach oben/rechts. Fix: plane.Origin = (x_min, y_min, z_doc). Co-Authored-By: Claude Opus 4.7 --- rhino/swisstopo.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/rhino/swisstopo.py b/rhino/swisstopo.py index fb07a10..ec403d9 100644 --- a/rhino/swisstopo.py +++ b/rhino/swisstopo.py @@ -761,14 +761,12 @@ def add_ortho_plane(doc, ortho_path, tile_bbox_lv95, shift_lv95, m_to_unit, x_max = (e_max - sx) * m_to_unit y_min = (n_min - sy) * m_to_unit y_max = (n_max - sy) * m_to_unit - # Centered plane, mesh-based PictureFrame mit embedded Bitmap. - # asMesh=True ist anders gerendert als Brep-Variante; bei Brep zeigte - # Mac Rhino 8 die Textur in keinem Modus. - cx = (x_min + x_max) / 2.0 - cy = (y_min + y_max) / 2.0 + # PictureFrame mit embedded Bitmap. AddPictureFrame interpretiert + # plane.Origin als BOTTOM-LEFT corner der Picture (nicht als Zentrum!). + # Width geht in +X-Richtung, Height in +Y-Richtung des Planes. width = abs(x_max - x_min) height = abs(y_max - y_min) - plane = rg.Plane(rg.Point3d(cx, cy, z_doc), + plane = rg.Plane(rg.Point3d(x_min, y_min, z_doc), rg.Vector3d.XAxis, rg.Vector3d.YAxis) try: size_mb = os.path.getsize(ortho_path) / 1e6