leozide / leocad

A CAD application for creating virtual LEGO models
https://www.leocad.org
2.48k stars 212 forks source link

Stepped additive and subtractive selection for grouped parts (using repeated clicks?) #935

Open Halodule opened 1 month ago

Halodule commented 1 month ago

Is your feature request related to a problem? Please describe.

Currently (v23.03) when you select some part A and then control-click (+select) a part Q that is in a group QRS, all of QRS is added to the selection.

By contrast, if you first rectangle-select all of A, Q, R and S, and then shift-click (-select) Q, only Q is removed from the selection, not the group QRS.

This feels inconsistent. It also means there is no obvious way to add only a part (Q) in a larger group (QRS) to a selection; or to remove a group (QRS) as a whole from a wider selection.

Describe the solution you'd like

Not sure how good this is, but e.g.:

When I have A selected, if I control-click only on Q, only Q is added to the selection. If I keep holding Ctrl and click once more in the same spot, all of QRS is added to the selection.

Likewise, when all of A, Q, R and S are selected, and I shift-click once on Q, only Q is subtracted from the selection. If I keep holding Shift and click once more, all of QRS is subtracted.

In case of nested groups-within-groups, move up the group structure from the smallest (single part) to the top group level: first Q, then QRS, then QRST etc.

Thanks for an awesome program!

nathaneltitane commented 1 month ago

i second this - would be very useful for super complex models!

@Halodule but have you also tried to use model in context editing? instead of grouping, create submodels, assemble them in a main model entry within the same file - you can then access them and recurse through the sub asembly levels (sorta)

@leozide the in context editing could also benefit from OP'S idea where you cannot navigate through groups or assemblies when doing in context editing - a solid nice to have feature.

Halodule commented 4 weeks ago

@nathaneltitane Thanks for the submodels suggestion; I am just starting out with LeoCAD and had not explored this yet. It does indeed allow for removing a 'group' (now actually a submodel) as a whole from a wider selection - useful :)

However, it does not seem to help with the counterpart of adding Q (part of QRS) to a selection: since one can't select individual parts of a submodel when working in the main model screen?

So yes, the feature request still stands. It would seem much faster to work with too, especially for multiple recursive groupings. But thanks for the partial workaround!

app4soft commented 4 weeks ago

@Halodule, inserted submodel does not allow to select a single part from it and go on upper level and select something else ­— jumping up it would select submodel in a whole as a single part.

Expected behaviour

@leozide, this is a feature request for adding special "Selection Mode" for a single click selection of single parts from a group or submodel.

So, if hold LMB+Ctrl and pick one by one: "Q" (from "QRS" group), "R" (from "RSQ" submodel) and "A" (part in the root) only these three parts should be in selection and could be moved together, without moving group and submodel itself (transformation of selected parts from group and submodel should be reflexed inside group and submodel accordingly).

Screenshot

leocad-single-selection

Actual behaviour

Actual default "Edit > Selection Mode > Single Selection" really is not single selection if picked part is in the group or in submodel:

Sample file

Here is a code of MPD-file for simple usecase:

0 FILE New Model.ldr
0 
0 Name: New Model.ldr
0 Author: 
1 4 0 -8 0 1 0 0 0 1 0 0 0 1 3070bpta.dat
0 !LEOCAD GROUP BEGIN Group #1
1 0 20 -8 -20 1 0 0 0 1 0 0 0 1 3070bptq.dat
1 0 40 -8 -20 1 0 0 0 1 0 0 0 1 3070bptr.dat
1 0 60 -8 -20 1 0 0 0 1 0 0 0 1 3070bpts.dat
0 !LEOCAD GROUP END
1 0 20 0 20 1 0 0 0 1 0 0 0 1 Submodel #1.ldr
0 NOFILE
0 FILE Submodel #1.ldr
0 
0 Name: Submodel #1.ldr
0 Author: 
1 16 40 -8 0 1 0 0 0 1 0 0 0 1 3070bptq.dat
1 16 0 -8 0 1 0 0 0 1 0 0 0 1 3070bptr.dat
1 16 20 -8 0 1 0 0 0 1 0 0 0 1 3070bpts.dat
0 NOFILE