kicad-developers team mailing list archive
Mailing list archive
Re: WYSISYG pad editor
I confess I haven’t looked at the padstack document yet.
The prototype WYSIWYG shape editor is currently only in the Footprint Editor, although I’ve made most of the code agnostic between that and the board editor.
I did look at doing it in the Pad Properties dialog, but that got nixed on account of many custom-shaped pads being related to each other (and therefore easier to edit en masse), and on that being the hardest place to integrate our tool framework (although I got far enough down that path that it’s now somewhat easier).
The trouble with the single-pad mode is that there’s a *lot* of editing code you do want to make available (copy/paste, duplicate, flip, rotate, move exactly, creating new shapes, deleting some existing shapes, etc.), and a *lot* that you want to exclude (pasting other shapes, pasting into other layers, switching layers, etc.). That’s going to equate to a lot of code that has to be maintained.
Doing all pads at once gets around this, but it does indeed have the “might connect two pads” issue. (Then again, it will only do that if their copper/mask/whatever is touching, so is that really an issue in practice? Hmm… if someone is using a polygon to do a neck-down to a pad, and we allow recombine to run in Pcbnew, then we’re going to suck that polygon into the pad definition. Maybe we do need to keep it Footprint Editor only.)
> On 26 Jun 2020, at 17:05, Roberto Fernández Bautista <roberto.fer.bau@xxxxxxxxx> wrote:
> Hi Jeff,
> Did you have a chance to look at the draft document I sent on padstacks a few days ago? I briefly explain how Altium and Cadstar handle pads and vias in that document - hopefully it is helpful?
> I'd like to point out that custom pad shapes are not actually well supported in most other commercial EDAs, so what you are doing at KiCad is definitely above and beyond! Great stuff!
> The prototype shape editor that you are talking about: is this in pcbnew or in the footprint editor? I suppose it would be valid to use this both for editing vias in the PCB as well as pads in a footprint, in the library. Maybe this could be done in the properties window of the pad/via where you could have a basic drawing canvas to draw the shape of the pad/via (maybe in the future you could even import a DXF or other similar format to define the pad shape). Each shape could maybe be saved into a library that can be re-used/selected.
> I'd suggest that regardless of it being a "high contrast mode" or a "properties" window: if you are creating custom shapes for a pad, you should only be doing that: i.e. you are entering "pad editing mode" - you don't want to be accidentally moving other things around while you are doing that and certain certain things should be restricted while in this "mode" - e.g.
> if you "paste other stuff", you should look at what is being pasted and if it is a valid shape object, you could accept it, otherwise just don't do anything;
> you should not allow to "delete the pad anchor" - only to move it
> new objects on different layers - isn't the idea of this to be a padstack editor? If so, then assign those shapes to the specific layer.
> I'm not sure I understand your second approach of exploding pads into shapes? Seems to me like you might end up with a lot of random shapes that don't get recombined if you forget to run the "recombine" command? Also I can see that you'd end up joining up several pads together accidentally... I'd suggest the "editing" mode should restrict editing to a single pad
> Roberto (Qbort)
> On Thu, 25 Jun 2020 at 21:53, Jeff Young <jeff@xxxxxxxxx <mailto:jeff@xxxxxxxxx>> wrote:
> I implemented a prototype of a WYSIWYG custom-pad shape editor.
> You can ctrl-E on a pad and it explodes it and puts you into high-contrast mode with the shapes. After editing the shapes a second ctrl-E re-combines everything and exits high-contrast mode.
> While it’s pretty neat if you do exactly that, it turns out to have a bazillion corner cases. (What happens if you paste other stuff in; what happens if you delete the pad anchor; what happens if you create new objects on different layers; etc.)
> So I was considering a different idea which would be more “regular” (from an implementation perspective).
> Basically it would be a command to explode *all* pads in the current footprint, and a command to recombine everything. The recombine would expand outwards from each pad to consume touching copper shapes. (It might still need a few edge cases for net-ties.)
> Mailing list: https://launchpad.net/~kicad-developers <https://launchpad.net/~kicad-developers>
> Post to : kicad-developers@xxxxxxxxxxxxxxxxxxx <mailto:kicad-developers@xxxxxxxxxxxxxxxxxxx>
> Unsubscribe : https://launchpad.net/~kicad-developers <https://launchpad.net/~kicad-developers>
> More help : https://help.launchpad.net/ListHelp <https://help.launchpad.net/ListHelp>