← Back to team overview

kicad-developers team mailing list archive

Re: Static variables in module editor

 

Le 11/06/2014 09:36, Tomasz Wlostowski a écrit :
> On 11.06.2014 07:30, Dick Hollenbeck wrote:
>> On 06/10/2014 04:39 PM, Tomasz Wlostowski wrote:
>>> On 10.06.2014 16:40, Dick Hollenbeck wrote:
>>>>>
>>>>> I clicked send, replying to Lorenzo's comment right when your next
>>>>> e-mail came. Sorry for that,
>>>>
>>>>
>>>> Thanks Tom, apology accepted.
>>>>
>>>> Another thing we get by supporting multiple open projects and paste,
>>>> is we are only one
>>>> step away (i.e. COPY) from having copy and paste across projects,
>>>> and therefore libraries.
>>>>
>>>> This is leaner than the current methodology of having to switch
>>>> "current libraries" to
>>>> move a footprint from one to another.  And while yes code
>>>> improvements could also have
>>>> brought this, what we're seeing with this multiple project approach
>>>> is the footprint
>>>> movement support *without changing existing code* to any great
>>>> extent.   That sounds like
>>>> free to me.
>>>>
>>> Dick,
>>>
>>> I don't see any issue with adding copy/paste and using s-exprs is the
>>> right way of doing so. But this discussion was about getting rid of a
>>> bunch of static variables.
>>>
>>> My proposal would be to:
>>> 1. Remove the statics, temporarily removing the
>>> retain-last-edited-footprint feature.
>>> 2. Add copy/paste in both pcbnew main window and the module editor.
>>> 3. Once the copy/paste code is verified, use PROJECT::GetRString() to
>>> bring back the last footprint feature.
>>>
>>> This way we would have ultimately less coding to do at the cost of
>>> temporarily disabling a feature that is IMHO not absolutely necessary
>>> for Kicad to work.
>>
>> It was not that much coding, less than 30 lines I think.  I did not do
>> the PASTE support
>> yet, but the retention of the last footprint is in rev. 4937.  It took
>> me about 1/2 hour
>> and that's longer than it would have taken had I consulted the places
>> I've use this
>> support elsewhere.
> Dick,
> 
> I agree it's very easy if you want to copy an entire footprint from one
> library to another. But things may get complicated for general-purpose
> copy paste with arbitrarily selected items.
> 
> Imagine that you want to copy-paste a bunch of traces/vias from one PCB
> file to another. What happens with the nets? Should one ignore the nets
> of the copied objects and propagate the nets of the items in target
> design that are colliding with the pasted items? Or store the
> netcode<>netname mapping in the clipboard too and add new nets to the
> target design?
> 
> Regards,
> Tom

copying items from a board to an other board creates very tricky issues.
copying items inside a board (i.e. duplicate items) is also not trivial.

Obvious issues are related to:
netcode and netname
netclasses
zones (merging or not)
duplicate reference designators and time stamps
Moreover, reference designators and time stamps coming from an other
board could have no meaning for the current schematic.
For me, reference designators and time stamps are the main issue.

Having a good copy/paste tool is a good thing.

How to efficiently use this tool is an other story.

-- 
Jean-Pierre CHARRAS


Follow ups

References