ifcviewer-full: per-model ModelTransformation editor

ModelTransformationDialog edits one federation model at a time.  Top
combobox picks the model; below it the form covers the four pieces
of authoring intent:

  - AFrame radio: ModelLocal vs ModelGlobal
  - Point A: 3 doubles, label switches between "model project length
    unit" and "model map unit" with the radio
  - Point B: 3 doubles in federation units (label reflects current
    FederationConfig.unit_*)
  - Rotation: rx/ry/rz in degrees, intrinsic XYZ
  - Pivot: 3 doubles in federation units

Switching models discards unsaved form edits — Ok saves the
currently-visible model, Cancel discards.  On Ok calls
Federation::setModelTransformation, which fires
modelTransformationChanged → MainWindow recomposes that model in
the viewport.

Reachable from File > Model Transformations.

End-to-end is now editable: open a federation, edit federation unit /
false origin from one dialog, edit any model's transformation from
the other, watch the viewport recompose live.  Visual verification
on a real model still pending.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
Dion Moult
2026-05-02 08:06:25 +10:00
parent 81b1efdfd6
commit 8f3eaa35d7
4 changed files with 351 additions and 0 deletions
+3
View File
@@ -37,6 +37,7 @@
class Federation;
class SettingsWindow;
class FederationSettingsDialog;
class ModelTransformationDialog;
class MainWindow : public QMainWindow {
Q_OBJECT
@@ -63,6 +64,7 @@ private slots:
void onGoHomeView();
void onFileSettings();
void onFederationSettings();
void onModelTransformations();
void onObjectPicked(uint32_t object_id);
void onTreeSelectionChanged();
@@ -122,6 +124,7 @@ private:
Federation* federation_ = nullptr;
SettingsWindow* settings_ = nullptr;
FederationSettingsDialog* federation_settings_ = nullptr;
ModelTransformationDialog* model_transformations_ = nullptr;
QWidget* viewport_container_ = nullptr;
QTreeWidget* element_tree_ = nullptr;
QTableWidget* property_table_ = nullptr;