The technicalities of creating nested grouping is not the biggest problem.
The real headache I would say is how to get this intuitive and how to
present this to the user. The current implementation everyone can agree
is useful and not that hard to understand/redo/change.

I would suggest I fix the file format additions and save/load, and then 
this get merged. Nested groups create a few additional UI questions 
that I dont have any answer to as of yet. But extending this work to 
enable nested groups is not that hard.

- Kristoffer


On 01/13/2017 03:51 PM, Maciej Sumiński wrote:
> Hi Kristoffer,
> 
> Please consider the following ideas, perhaps you will find it useful:
> 
> * Create a PCB_GROUP class inheriting from BOARD_ITEM_CONTAINER
> 
>   As BOARD_ITEM_CONTAINER is also a BOARD_ITEM, you get an easy way of
> creating nested groups. This also enables selecting a group with the
> selection tool, as the group is now a part of the board. Another benefit
> is a possibility of graphic representation (a border/semitransparent
> background) to indicate a group. You can also have a single item
> belonging to several groups, if someone finds it useful.
>   PCB_GROUPs would have to be stored in a BOARD object.
>   The downside is dealing with the undo buffer and netlist updates. As a
> result of certain operations BOARD_ITEMs are added & removed, and their
> groups have to be updated too. Perhaps a set of shared_ptrs in
> BOARD_ITEM to its parent GROUPs would fix the problem, but it may need
> some further consideration.
> 
> * Room recipe (just to evaluate if it is feasible with the current approach)
> 
>   Rooms/channels are usually done by embedding a single schematic sheet
> multiple times. This fact is reflected in the component sheet path, so
> it is easy to determine corresponding components in different rooms.
>   Example sheet paths for two components in two different subsheets:
> 
>    | sheet 1  | sheet 2
> ---+----------+---------
> C1 | /12C/FA0 | /81A/FA0
> R1 | /12C/41E | /81A/41E
> 
>   Rooms (groups) would be created upon request during netlist import,
> basing on the schematic sheet path.
>   Copying one room layout to another:
> * Find a reference component in both rooms (e.g. C1)
> * Computing relative position of other components in the source room
> * Apply the relative position to components in the destination room
> 
> The tricky part is recreating the tracks/vias. To do so, one needs to
> find all the room internal tracks and copy them to the destination room,
> updating the nets. Perhaps that will be simpler with the new
> connectivity algorithm, but a possible way is:
> * Iterate through all components pads in the source room
> * Find the attached tracks and see if they lead to another component in
> the same room. If it is true, the track should be copied.
> * Propagate nets from pads.
> 
> Regards,
> Orson
> 
> On 01/13/2017 03:23 PM, Kristoffer Ödmark wrote:
>> Okay, got it.
>>
>> For the group selection thing, I did some quick tests today, and only
>> letting board items belong to one group at a time seems like a good way,
>> letting them belong to multiple groups gave me a headache in how to
>> implement any way of handling the groups.
>>
>> This would then change the format for the pcb file with one value under
>> every saved board item in the kicad_pcb file. suggesting (group <name>)
>> to be used for this. ( tracks, vias, texts, etc etc )
>>
>> This does not hinder the development for hierarchy of the groups later
>> on. That could be fixed with having another field later which keeps
>> track of the hierarchy and parents/childs groups.
>>
>> I looked over my implementation and changed everything to use wxStrings
>> and wxArrayStrings, to be more like current things in Kicad, I do not
>> know if this was an issue or not.
>>
>> Is the file format upgrade for the current implementation okay? If it is
>> I will start implementing it this weekend.
>>
>> - Kristoffer
>>
>> On 01/13/2017 02:07 PM, Wayne Stambaugh wrote:
>>> Kristoffer,
>>>
>>> I was merely talking about getting your initial implementation correct
>>> in Pcbnew to prevent issues with the full implementation down the road.
>>> While I'm OK with opening up a full design specification, I think it's a
>>> bit premature and will distract us from the immediate work at hand.
>>> None of the schematic group linking work can happen until the new
>>> schematic and symbol library file formats are complete.  I want to keep
>>> the focus on grouping in Pcbnew for the time being and not get bogged
>>> down in a full implementation specification.
>>>
>>> Cheers,
>>>
>>> Wayne
>>>
>>> On 1/12/2017 3:38 PM, Kristoffer Ödmark wrote:
>>>> I think Physical design reuse (PDR) is far out of scope of the group
>>>> selection idea. However it Might be used. I actually put some thinking
>>>> on howto implement some kind of PDR into Kicad without having to
>>>> redesign everything existing already. Its in a google doc with comments
>>>> enabled.
>>>>
>>>> [Google docs link]
>>>> https://docs.google.com/document/d/1ivRRu7F2g6_WU9bgHlaUTaXZw02oluMh4NA41BqEM-8/edit?usp=sharing
>>>>
>>>>
>>>>
>>>> PDR discussions I think should be in a separate thread, since the amount
>>>> of work to get there is quite a bit more, involves both eeschema and
>>>> pcbnew, new file formatting, specifying workflows etc etc.
>>>>
>>>> Its called snippets in A****m, PDR in PADS.
>>>>
>>>> - Kristoffer
>>>>
>>>> On 2017-01-12 18:47, Clemens Koller wrote:
>>>>> Hello!
>>>>>
>>>>> This feature looks really useful in production if it's implemented
>>>>> properly.
>>>>> Some comments from my side how things could be extended in the future:
>>>>>
>>>>> Group selection (also read: table-based/parametric-based selection!)
>>>>> seems like a great feature and the step towards physical design reuse
>>>>> (PDR).
>>>>> With some intelligent grouping of routed components and
>>>>> automatic/assisted selection of components based on netlist-topology
>>>>> (or manual or table based selection) it is possible to create a
>>>>> physical design reuse (or channels) by duplicating groups with the
>>>>> same layout but different component references + different net names /
>>>>> instances of net names.
>>>>> An additional approach is intelligent "group editing" (table based - a
>>>>> must have for complex designs!) where there is an automatic / assisted
>>>>> rename of components and netnames to create reuses. This also applies
>>>>> to the schematic entry, obviously.
>>>>>
>>>>> The word "intelligent" above means obviously, that there is some
>>>>> infrastructure and coding work to consider.
>>>>>
>>>>> An example screenshot of one of my designs using a buggy commercial
>>>>> product is attached. There are 60 similar channels.
>>>>> Layouting these manually would be a hell of work, obviously.
>>>>>
>>>>> Regards,
>>>>>
>>>>> Clemens
>>>>>
>>>>>
>>>>> On 2017-01-12 17:37, Wayne Stambaugh wrote:
>>>>>> I think this feature would be useful but we should proceed with
>>>>>> caution
>>>>>> if we are going to include persistence.  I'm guessing making groups
>>>>>> persistent will require a change to the pcb file format.  We should
>>>>>> think this through thoroughly before moving forward.  Is it possible
>>>>>> that this grouping could be used for an a****m like room feature?  If
>>>>>> so, than we need to plan this out accordingly rather than just
>>>>>> commit a
>>>>>> new feature for the sake of convenience.
>>>>>>
>>>>>> On 1/12/2017 6:55 AM, Tomasz Wlostowski wrote:
>>>>>>> I like it. Give me a few days to review it and I hope it will get
>>>>>>> merged. You'll also have to make the groups persistent (save to
>>>>>>> file).
>>>>>>> Recursive grouping (group of groups) would be also an advantage.
>>>>>>>
>>>>>>>
>>>>>>> Cheers,
>>>>>>> Tom
>>>>>>>
>>>>>>> Sent from my Samsung Galaxy smartphone.
>>>>>>>
>>>>>>>
>>>>>>> -------- Original message --------
>>>>>>> From: Kristoffer Ödmark <kristofferodmar...@gmail.com>
>>>>>>> Date: 12/01/2017 12:41 (GMT+01:00)
>>>>>>> To: kicad-developers@lists.launchpad.net
>>>>>>> Subject: Re: [Kicad-developers] Group selection idea
>>>>>>>
>>>>>>> Hey again, What would be the chances of seing this getting into the
>>>>>>> master branches on launchpad, what would I have to add/change to
>>>>>>> get it
>>>>>>> there?
>>>>>>>
>>>>>>> - Kristoffer
>>>>>>>
>>>>>>> On 2017-01-11 21:59, Kristoffer Ödmark wrote:
>>>>>>>> Attaching Patch!
>>>>>>>>
>>>>>>>> ( Thanks Chris! )
>>>>>>>>
>>>>>>>> On 2017-01-11 20:51, Kristoffer Ödmark wrote:
>>>>>>>>> Hello!
>>>>>>>>>
>>>>>>>>> I hacked together a group selection concept looking like this:
>>>>>>>>> https://youtu.be/eJp-aJ8i0H4
>>>>>>>>>
>>>>>>>>> It can assign BOARD_ITEM to a specific group for easier
>>>>>>>>> selection and
>>>>>>>>> group manipulation. I am open to suggestions on changes, this is
>>>>>>>>> surely
>>>>>>>>> not an optimal implementation.
>>>>>>>>>
>>>>>>>>> Useful when you may want to keep the relative position of
>>>>>>>>> something on
>>>>>>>>> the board like maybe a RF layout etc.
>>>>>>>>>
>>>>>>>>> It cannot currently save the group assignments between sessions,
>>>>>>>>> since
>>>>>>>>> that would require some changes to the file format. That would
>>>>>>>>> need some
>>>>>>>>> agreement that this is indeed wanted.
>>>>>>>>>
>>>>>>>>> it also doesnt work on zones right now.
>>>>>>>>>
>>>>>>>>> ps: I do not now the best way to attach a patch file.
>>>>>>>>> I added my feature
>>>>>>>>> commit
>>>>>>>>> git pull
>>>>>>>>> fix conflict
>>>>>>>>> commit
>>>>>>>>>
>>>>>>>>> Anyone have any steps on how to get one patch file for this, now I
>>>>>>>>> got
>>>>>>>>> one patch file, and a merge.
>>>>>>>>>
>>>>>>>>> - Kristoffer
>>>>>>>
>>>>>>> _______________________________________________
>>>>>>> Mailing list: https://launchpad.net/~kicad-developers
>>>>>>> Post to     : kicad-developers@lists.launchpad.net
>>>>>>> Unsubscribe : https://launchpad.net/~kicad-developers
>>>>>>> More help   : https://help.launchpad.net/ListHelp
>>>>>>>
>>>>>>>
>>>>>>> _______________________________________________
>>>>>>> Mailing list: https://launchpad.net/~kicad-developers
>>>>>>> Post to     : kicad-developers@lists.launchpad.net
>>>>>>> Unsubscribe : https://launchpad.net/~kicad-developers
>>>>>>> More help   : https://help.launchpad.net/ListHelp
>>>>>>>
>>>>>>
>>>>>> _______________________________________________
>>>>>> Mailing list: https://launchpad.net/~kicad-developers
>>>>>> Post to     : kicad-developers@lists.launchpad.net
>>>>>> Unsubscribe : https://launchpad.net/~kicad-developers
>>>>>> More help   : https://help.launchpad.net/ListHelp
>>>>>>
>>>>>>
>>>>>>
>>>>>> _______________________________________________
>>>>>> Mailing list: https://launchpad.net/~kicad-developers
>>>>>> Post to     : kicad-developers@lists.launchpad.net
>>>>>> Unsubscribe : https://launchpad.net/~kicad-developers
>>>>>> More help   : https://help.launchpad.net/ListHelp
>>>>
>>>> _______________________________________________
>>>> Mailing list: https://launchpad.net/~kicad-developers
>>>> Post to     : kicad-developers@lists.launchpad.net
>>>> Unsubscribe : https://launchpad.net/~kicad-developers
>>>> More help   : https://help.launchpad.net/ListHelp
>>>
>>>
>>> _______________________________________________
>>> Mailing list: https://launchpad.net/~kicad-developers
>>> Post to     : kicad-developers@lists.launchpad.net
>>> Unsubscribe : https://launchpad.net/~kicad-developers
>>> More help   : https://help.launchpad.net/ListHelp
>>>
>>
> 
> 
> 
> 
> _______________________________________________
> Mailing list: https://launchpad.net/~kicad-developers
> Post to     : kicad-developers@lists.launchpad.net
> Unsubscribe : https://launchpad.net/~kicad-developers
> More help   : https://help.launchpad.net/ListHelp
> 

-- 
 -Kristoffer

_______________________________________________
Mailing list: https://launchpad.net/~kicad-developers
Post to     : kicad-developers@lists.launchpad.net
Unsubscribe : https://launchpad.net/~kicad-developers
More help   : https://help.launchpad.net/ListHelp

Reply via email to