feat(select): Ctrl+click picks one segment of a polyline

Ctrl+click on a polyline selects the segment under the cursor (again to
drop it); several segments can be picked. Only the picked segments are
highlighted, and MOVE, ROTATE, SCALE and MIRROR then change just their
vertices, so the neighbouring segments stretch to follow. Any other
selected objects are transformed whole as before.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
Hakan SevenandClaude Opus 5.5 committed 2026-10-13 22:14:56 +03:00
1 parent 11f68a1185
commit fcf1cedf52
6 files changed
+220 -1

No files matched your search

+5
View File
@@ -9,6 +9,7 @@ pub mod annotative;
pub mod assoc_array;
pub mod compare;
pub mod section_cull;
pub mod sub_select;
pub mod block_service;
pub mod cache;
pub mod convert;
@@ -2124,6 +2125,9 @@ pub struct Scene {
lighting_cache: RefCell<HashMap<(Handle, u64), Vec<SceneLight>>>,
/// Currently selected entity handles.
pub selected: HashSet<Handle>,
/// Polylines only part of which is selected (Ctrl+click): the picked
/// segment indices.
pub sub_segments: HashMap<Handle, std::collections::BTreeSet<usize>>,
selected_order: Vec<Handle>,
/// The parametric-constraint glyph currently selected in the viewport.
/// Entity selection changes clear it so the two selections stay exclusive.
@@ -2764,6 +2768,7 @@ impl Scene {
object_data_cache: crate::entities::object_data::ObjectDataCache::default(),
lighting_cache: RefCell::new(HashMap::default()),
selected: HashSet::default(),
sub_segments: HashMap::default(),
selected_order: Vec::new(),
selected_constraint: None,
object_isolation: ObjectIsolationState::default(),