mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-14 03:14:23 +00:00
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:
@@ -21,6 +21,7 @@
|
||||
#include "AppSettings.h"
|
||||
#include "Federation.h"
|
||||
#include "FederationSettingsDialog.h"
|
||||
#include "ModelTransformationDialog.h"
|
||||
#include "SettingsWindow.h"
|
||||
#include "LodBuilder.h"
|
||||
#include "SidecarCache.h"
|
||||
@@ -192,6 +193,8 @@ void MainWindow::setupMenus() {
|
||||
QKeySequence::SaveAs);
|
||||
file_menu->addAction("Federation Se&ttings...",
|
||||
this, &MainWindow::onFederationSettings);
|
||||
file_menu->addAction("&Model Transformations...",
|
||||
this, &MainWindow::onModelTransformations);
|
||||
file_menu->addSeparator();
|
||||
file_menu->addAction("&Settings...", this, &MainWindow::onFileSettings);
|
||||
file_menu->addSeparator();
|
||||
@@ -240,6 +243,15 @@ void MainWindow::onFederationSettings() {
|
||||
federation_settings_->raise();
|
||||
}
|
||||
|
||||
void MainWindow::onModelTransformations() {
|
||||
if (model_transformations_ == nullptr) {
|
||||
model_transformations_ = new ModelTransformationDialog(federation_, this);
|
||||
}
|
||||
model_transformations_->open();
|
||||
model_transformations_->activateWindow();
|
||||
model_transformations_->raise();
|
||||
}
|
||||
|
||||
void MainWindow::addFiles(const QStringList& paths) {
|
||||
QStringList accepted_paths;
|
||||
QStringList accepted_fed_ids;
|
||||
|
||||
Reference in New Issue
Block a user