← Back to team overview

kicad-developers team mailing list archive

Re: Re: Patch: improved magnetism

 

Hi All,

I've added an option to enable/disable magnetic tracks in the general
options dialog of PCBnew (same as the magnetic pads option.) Please
inspect it & it's behavior to make sure it all works as desired. I
haven't fixed the via issue (since I don't quite understand why it is
doing this, nor does it occur in 100% of the cases), but now I can
just turn off magnetic tracks when I desire to move vias by small
increments. Magnetic tracks are on by default. My original complaint
is here:
http://tech.groups.yahoo.com/group/kicad-devel/message/1155

I've also mostly gotten rid of the annoying "Unable to drag this
segment: two collinear segments" error. Now, if two (or more)
segments are collinear, they are merged into one equivalent segment
when you try to drag them while maintaining slope. I can't imagine
any cases where this would be a bad thing (and I have plenty of
experience where the error was not desired!). Note I say *mostly*
because there still seem to be some length=1 (e.g. 0.003mm) segments
at the end of valid-length segments. I do not want to remove them
because this would change the board layout, though in a basically
imperceptible way. We could maybe have an option to clean & remove
these minimal-length segments, but I worry that they serve to connect
things slightly off grid & those on-grid; also, removal may cause DRC
errors. It would be good if we could avoid their creation.(?)

cheers,
Tim

>
> Magnus Beischer wrote:
> > --- In kicad-devel@xxxxxxxxxxxxxxx, Dick Hollenbeck <dick@...> wrote:
> >
> >>
> >>> but I have found
> >>> one bug, or rather unwanted feature:
> >>>
> >>>
> >> Re: Magnetic, Parallel Track under the Mouse while drawing new track
> >>
> >>
> >> Magnus,
> >>
> >> I just checked in a fix that seems to work better now. For the
> >> parallel case, it snaps to the nearest end point of the track under the
> >> mouse, if that track is magnetic and we entered the track traveling
> >> parallel to it.
> >>
> >> Thanks for your your time testing, you did a nice job catching this
> >> problem, Magnus.
> >>
> >>
> >>
> >> Dick Hollenbeck
> >> SoftPLC Corporation
> >> http://softplc.com
> >>
> >>
> >
> > Dick, I have done some testing and your latest fix improved the
> > magnetic function, but I think there is one detail left to fix:
> >
> > On an old board I tested with 8 mil tracks and the grid on 20 mil,
> > making me have no grid points in the center of the old tracks. When
> > starting a track (delete old tracks ON) with the intention of making a
> > better way for a track, the cursor snaps to the center of a track and
> > I can move the cursor along the track making the cursor jump 20 mils
> > at a time, even there is no grid point in the center of the track.
> > This is good! When I have started to draw a track, I'd like the same
> > freedom to end my track anywhere in center of a track. Not just at the
> > track points. I can do this if I approach the track at some angel, but
> > not when I am in line with the track.
> >
> > I did some work last week setting up the source and build
> > environments, and I plan to spend time testing and commenting new and
> > existing features for pcbnew. I am using pcbnew professionally and
> > this can be my first way to help out in the improvement process of
> > pcbnew.
> >
> > // Magnus
> >
> >
>
> There may be a compromise that gives you what you want, but also applies
> some magnetism to the ends of the track also, which is what is needed
> most of the time.
>
> Please start looking at or near line 396 of pcbnew/controle.cpp, for a
> line like this:
>
> if( aCurrentTool == ID_TRACK_BUTT )
>
> and look in that C++ scope. That is where you would need to blend in
> some of your freedom. But again, please leave some magnetism on the
> ends, that is by far more common than what I think you are saying.
>
> Thanks,
>
> Dick
>






Follow ups

References