forked from 1b-agent/opencadstudio-upstream
Merge branch 'main' into feature/parametric-constraint-system
Brings in 54 commits from origin/main: a selection-performance overhaul, surface thickening, GPU-native wide/tapered stroke rendering, continued ocs_doc_api evolution, and assorted fixes/polish (block double-click editing, DWG hatch/database repair, clipboard, collapsible Properties sections). Six real conflicts, all where this branch had independently re-applied a fix upstream later revised or already carried natively: - src/app/automation.rs, src/app/command_driver.rs: combined both sides — kept this branch's sketch-constraint/named-parameter loading on "new"/"open", adopted main's Scene::clear()/material_base_dir and its newer rebuild_derived_caches() over the older bump_geometry(). Scene::clear() (src/scene/entity.rs) now also resets sketch_constraints/named_parameters, so every caller gets this for free instead of each call site repeating it. - src/io/mod.rs, src/scene/render_graph.rs: adopted main's design outright (commit973af87d, authored by Hakan directly) — a large MINSERT is no longer purged as "corrupt" at load, only its rendering is bounded, preserving the source data. This branch's own earlier design (reject at load) predates that revision. - src/scene/pipeline/mesh_gpu.rs: adopted main's valid_rgba_size() guard (a real robustness improvement over this branch's version). - src/snap.rs: replaced wholesale with main's version — this branch's copy was an explicit verbatim snapshot from an earlier upstream PR (commit4c264b8c) with zero constraint-system-specific content, and main has since evolved it considerably further. Also removed two now-dead duplicates the merge surfaced without a conflict marker (both branches had independently fixed the same things): the OPTIONS/OP command dispatch/autocomplete entries, and automation.rs's open_finalizes_and_purges_like_the_ui_open_path test (kept main's version, which covers strictly more: solid_models/ material_base_dir reset on "new"). Full workspace suite passes (812 lib tests + this branch's own 24 constraint/persistence integration tests) except the one pre-existing, unrelated font-test failure already present on main. Zero clippy findings in the hand-written merge resolution itself; the ~1,171 warnings clippy reports are pre-existing in the 54 absorbed commits, not introduced here. Co-Authored-By: Claude Sonnet 5 <[email protected]>
This commit is contained in:
commit
d675244fb8
89 files changed
+5700
-1101
No files matched your search
@@ -387,6 +387,10 @@ pub(super) struct OpenCADStudio {
|
||||
/// though the three factors are currently equal — the user unchecked the
|
||||
/// "Uniform scale" box for them (#427). Keyed by entity handle.
|
||||
props_asym_scale: std::collections::HashSet<u64>,
|
||||
/// Collapsed Properties-panel section titles. This belongs to the app,
|
||||
/// rather than an individual document tab, so the same view preference is
|
||||
/// used by every currently open drawing/project.
|
||||
collapsed_property_sections: rustc_hash::FxHashSet<String>,
|
||||
/// Which Start-page section is shown when the page is too narrow for all
|
||||
/// three side by side and falls back to a tab bar.
|
||||
start_section: StartSection,
|
||||
@@ -496,6 +500,13 @@ pub(super) struct OpenCADStudio {
|
||||
cursor_size: i32,
|
||||
/// Selection-box size setting (PICKBOX, 0..=50).
|
||||
pick_box: i32,
|
||||
/// Use REFEDIT rather than BEDIT when double-clicking an attribute-free block.
|
||||
double_click_block_refedit: bool,
|
||||
/// Open ATTEDIT when double-clicking a block with attributes.
|
||||
double_click_block_attedit: bool,
|
||||
/// Selected-object count past which grips stop being generated
|
||||
/// (GRIPOBJLIMIT, 0..=32767; 0 = no limit).
|
||||
grip_object_limit: i32,
|
||||
/// Drawing viewport cursor style (CURSORTYPE).
|
||||
cursor_type: settings::CursorType,
|
||||
/// Explicit crosshair colour; `None` retains automatic contrast.
|
||||
@@ -1962,6 +1973,10 @@ pub enum Message {
|
||||
CursorSizeChanged(i32),
|
||||
/// Set PICKBOX from the Selection-page slider.
|
||||
PickBoxChanged(i32),
|
||||
/// Choose whether double-clicking a block starts BEDIT or REFEDIT.
|
||||
DoubleClickBlockRefeditChanged(bool),
|
||||
/// Choose whether double-clicking a block with attributes starts ATTEDIT.
|
||||
DoubleClickBlockAtteditChanged(bool),
|
||||
/// Set CURSORTYPE from Options.
|
||||
CursorTypeChanged(settings::CursorType),
|
||||
/// Set the model-space lineweight preview scale from Options.
|
||||
@@ -2008,6 +2023,19 @@ pub enum Message {
|
||||
GripHotChanged(u8),
|
||||
/// Change Hover/Warm Grip color ACI index (0 = Theme Primary Strong, 1..=255 = ACI, GRIPHOVER).
|
||||
GripHoverChanged(u8),
|
||||
/// Change the selected-object count past which grips stop being drawn
|
||||
/// (0..=32767, 0 = no limit, GRIPOBJLIMIT).
|
||||
GripObjectLimitChanged(i32),
|
||||
/// Toggle the solid selection highlight (SELECTIONEFFECT).
|
||||
SelectionEffectToggled(bool),
|
||||
/// Toggle rollover preview while no command is running (SELECTIONPREVIEW bit 1).
|
||||
SelectionPreviewIdleToggled(bool),
|
||||
/// Toggle rollover preview during a command (SELECTIONPREVIEW bit 2).
|
||||
SelectionPreviewCommandToggled(bool),
|
||||
/// Toggle "use Shift to add to selection"; this is the inverse of PICKADD.
|
||||
ShiftToAddToggled(bool),
|
||||
/// Toggle press-and-drag drawing a rectangle instead of a lasso (PICKDRAG).
|
||||
PickDragRectToggled(bool),
|
||||
/// Restore Model Space display/canvas appearance to defaults.
|
||||
RestoreModelSpaceDisplayDefaults,
|
||||
/// Restore Selection visual effect settings to defaults.
|
||||
@@ -2214,6 +2242,8 @@ pub enum Message {
|
||||
/// clipboard as plain text — issue #232, so output can be pasted for
|
||||
/// debugging instead of screenshotted.
|
||||
CommandHistoryCopy,
|
||||
#[cfg(target_arch = "wasm32")]
|
||||
CommandHistoryCopied(bool),
|
||||
/// Clear every line from the command-line history.
|
||||
CommandHistoryClear,
|
||||
/// Copy every line currently retained by the PERF panel.
|
||||
@@ -2604,6 +2634,8 @@ pub enum Message {
|
||||
/// Toggle a collapsed coordinate group ("Position", "Scale", …) open or
|
||||
/// closed in the Properties panel, keyed `section:base`.
|
||||
PropGroupToggle(String),
|
||||
/// Toggle an entire Properties-panel section, keyed by its title.
|
||||
PropSectionToggle(String),
|
||||
/// Toggle the editable-dropdown (block Name) option list open/closed.
|
||||
PropEditChoiceToggle,
|
||||
/// User is typing in a block-attribute value field (live buffer update),
|
||||
@@ -3378,6 +3410,7 @@ impl OpenCADStudio {
|
||||
discussions: Vec::new(),
|
||||
discussions_loading: false,
|
||||
props_asym_scale: std::collections::HashSet::new(),
|
||||
collapsed_property_sections: rustc_hash::FxHashSet::default(),
|
||||
start_section: StartSection::default(),
|
||||
start_action_w: std::sync::Arc::new(std::sync::atomic::AtomicU32::new(0)),
|
||||
history_content: iced::widget::text_editor::Content::new(),
|
||||
@@ -3426,6 +3459,9 @@ impl OpenCADStudio {
|
||||
zoom_factor: 60,
|
||||
cursor_size: 5,
|
||||
pick_box: 3,
|
||||
double_click_block_refedit: false,
|
||||
double_click_block_attedit: true,
|
||||
grip_object_limit: settings::DEFAULT_GRIP_OBJECT_LIMIT,
|
||||
cursor_type: settings::CursorType::Crosshair,
|
||||
crosshair_color: None,
|
||||
crosshair_color_input: String::new(),
|
||||
|
||||
Reference in new issue
Block a user