mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-13 10:57:49 +00:00
ifcviewer: filter iterator to net IfcElements, void-limit setting
Mirror bonsai's IfcImporter.process_element_filter so the streamer walks only IfcElement (plus IfcProxy on IFC2X3/IFC4), drops IfcFeatureElement except IfcSurfaceFeature, and routes elements with more openings than the configurable void limit through a second iterator pass with disable-opening-subtractions=true. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -25,6 +25,7 @@
|
||||
#include <QFormLayout>
|
||||
#include <QLineEdit>
|
||||
#include <QShowEvent>
|
||||
#include <QSpinBox>
|
||||
#include <QVBoxLayout>
|
||||
|
||||
SettingsWindow::SettingsWindow(QWidget *parent)
|
||||
@@ -57,6 +58,14 @@ void SettingsWindow::setupUi() {
|
||||
"and, on sidecar hits, avoids a second file read.");
|
||||
form->addRow("Load Property Data Source", load_data_source_check_);
|
||||
|
||||
void_limit_spin_ = new QSpinBox(this);
|
||||
void_limit_spin_->setRange(0, 100000);
|
||||
void_limit_spin_->setToolTip(
|
||||
"Skip elements with more openings (HasOpenings) than this. "
|
||||
"A handful of pathological elements can dominate boolean-subtraction "
|
||||
"time; dropping them keeps load times sane.");
|
||||
form->addRow("Void Limit", void_limit_spin_);
|
||||
|
||||
auto* button_box = new QDialogButtonBox(
|
||||
QDialogButtonBox::Ok | QDialogButtonBox::Cancel, this);
|
||||
|
||||
@@ -80,6 +89,7 @@ void SettingsWindow::syncFromSettings() {
|
||||
show_stats_check_->setChecked(AppSettings::instance().showStats());
|
||||
backface_culling_check_->setChecked(AppSettings::instance().backfaceCulling());
|
||||
load_data_source_check_->setChecked(AppSettings::instance().loadDataSource());
|
||||
void_limit_spin_->setValue(AppSettings::instance().voidLimit());
|
||||
}
|
||||
|
||||
void SettingsWindow::onAccepted() {
|
||||
@@ -87,5 +97,6 @@ void SettingsWindow::onAccepted() {
|
||||
AppSettings::instance().setShowStats(show_stats_check_->isChecked());
|
||||
AppSettings::instance().setBackfaceCulling(backface_culling_check_->isChecked());
|
||||
AppSettings::instance().setLoadDataSource(load_data_source_check_->isChecked());
|
||||
AppSettings::instance().setVoidLimit(void_limit_spin_->value());
|
||||
accept();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user