Skip to content

STEP Import as: hierarchy / flat / union + progress - #238

Merged
trailcode merged 4 commits into
mainfrom
Trailcode/import-part-hierarchy
Aug 1, 2026
Merged

STEP Import as: hierarchy / flat / union + progress#238
trailcode merged 4 commits into
mainfrom
Trailcode/import-part-hierarchy

Conversation

@trailcode

@trailcode trailcode commented Aug 1, 2026

Copy link
Copy Markdown
Owner

Summary

  • Replace Import Union shapes checkbox with Import as: Preserve hierarchy (default), Flat solids, Union shapes.
  • Show an Importing... modal during STEP Transfer; desktop gets stage/progress + Cancel on a background thread; web paints a simple wait dialog then runs Transfer on the main thread.
  • Slim the Import dialog (no pre-import metadata Transfer) and document the modes in usage/CHANGELOG/module docs.

Closes #237

Test plan

  • Desktop: Import a multi-body STEP with each Import as mode; verify Shape List hierarchy/names/root placement
  • Desktop: Cancel during Transfer; confirm nothing added and cancel toast
  • Desktop: Union failure aborts with no document changes
  • WASM: Confirm Importing... shows before UI freeze; import completes
  • PLY import unchanged
  • Review docs/usage.md and CHANGELOG.md

Note

Medium Risk
Changes the STEP import path (threading, cancel, and three Shape List placement modes) where geometry and hierarchy bugs would be user-visible; desktop off-thread OCCT transfer needs correct commit-on-UI-thread discipline.

Overview
STEP import UX is reworked: the Import dialog drops the pre-transfer metadata table and replaces the Union shapes checkbox with Import as (Preserve hierarchy, Flat solids, Union shapes).

Confirming import runs STEP through a new Importing... modal. Desktop runs prepare_step_import on a background thread with Atomic_progress_indicator (stage, percent, Cancel); WASM shows the modal for two frames then runs transfer on the main thread without Cancel. Document changes happen only via commit_step_import on the UI thread.

Occt_view::import_step now takes Step_import_mode and splits work into prepare_step_import (read/scale/fuse) plus commit_step_import (hierarchy groups, flat root leaves, or union under current group). XCAF/plain STEP readers forward Message_ProgressRange for cancellable transfer.

Reviewed by Cursor Bugbot for commit 2eef05a. Bugbot is set up for automated code reviews on this repo. Configure here.

@trailcode
trailcode merged commit fbcebd8 into main Aug 1, 2026
4 checks passed
@trailcode
trailcode deleted the Trailcode/import-part-hierarchy branch August 1, 2026 20:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

STEP Import as: hierarchy / flat / union + import progress

1 participant