Ortho-PictureFrame Position: Plane-Origin als Bottom-Left (statt Center)

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 <noreply@anthropic.com>
This commit is contained in:
2026-05-20 00:51:02 +02:00
parent 85f09390bc
commit 1e6bc68156
+4 -6
View File
@@ -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 x_max = (e_max - sx) * m_to_unit
y_min = (n_min - sy) * m_to_unit y_min = (n_min - sy) * m_to_unit
y_max = (n_max - sy) * m_to_unit y_max = (n_max - sy) * m_to_unit
# Centered plane, mesh-based PictureFrame mit embedded Bitmap. # PictureFrame mit embedded Bitmap. AddPictureFrame interpretiert
# asMesh=True ist anders gerendert als Brep-Variante; bei Brep zeigte # plane.Origin als BOTTOM-LEFT corner der Picture (nicht als Zentrum!).
# Mac Rhino 8 die Textur in keinem Modus. # Width geht in +X-Richtung, Height in +Y-Richtung des Planes.
cx = (x_min + x_max) / 2.0
cy = (y_min + y_max) / 2.0
width = abs(x_max - x_min) width = abs(x_max - x_min)
height = abs(y_max - y_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) rg.Vector3d.XAxis, rg.Vector3d.YAxis)
try: try:
size_mb = os.path.getsize(ortho_path) / 1e6 size_mb = os.path.getsize(ortho_path) / 1e6