[Kicad-developers] Improving DRC-correctness in tight situations
I've been looking into the DRC-correctness (or lack thereof) when routing on the edge, so to say. First of all I noted some places where (I think) the greater-than and lesser-than tests where wrong in inclusion/exclusion (greater-than versus greater-than-or-equal.) One such place was the first test in DRC::checkMarginToCircle(). A trivial case, according to the comments, yet still wrong. Then along came the beast. DRC::checkLine(). I found 8 tests which I believe was wrong. It would be nice with some code reviewing here! These changes are attached as a patch for pcbnew/drc_clearance_test_functions.cpp. I've also started looking into some rounding errors (with so far good results,) but that's a story for another day (much bigger patch.) Please look at my changes and tell me what you think. Best, Thomas === modified file 'pcbnew/drc_clearance_test_functions.cpp' --- pcbnew/drc_clearance_test_functions.cpp 2013-09-11 15:30:21 + +++ pcbnew/drc_clearance_test_functions.cpp 2013-11-26 08:25:14 + @@ -806,7 +806,7 @@ } -/* test if distance between a segment is aMinDist +/* test if distance between a segment is = aMinDist * segment start point is assumed in (0,0) and segment start point in m_segmEnd * and its orientation is m_segmAngle (m_segmAngle must be already initialized) * and have aSegmentWidth. @@ -1011,7 +1011,7 @@ */ bool DRC::checkMarginToCircle( wxPoint aCentre, int aRadius, int aLength ) { -if( abs( aCentre.y ) aRadius ) // trivial case +if( abs( aCentre.y ) = aRadius ) // trivial case return true; // Here, distance between aCentre and X axis is aRadius @@ -1056,14 +1056,14 @@ if( aSegStart.x aSegEnd.x ) EXCHG( aSegStart, aSegEnd ); -if( (aSegEnd.x m_xcliplo) || (aSegStart.x m_xcliphi) ) +if( (aSegEnd.x = m_xcliplo) || (aSegStart.x = m_xcliphi) ) { WHEN_OUTSIDE; } if( aSegStart.y aSegEnd.y ) { -if( (aSegEnd.y m_ycliplo) || (aSegStart.y m_ycliphi) ) +if( (aSegEnd.y = m_ycliplo) || (aSegStart.y = m_ycliphi) ) { WHEN_OUTSIDE; } @@ -1073,7 +1073,7 @@ temp = USCALE( (aSegEnd.x - aSegStart.x), (m_ycliplo - aSegStart.y), (aSegEnd.y - aSegStart.y) ); -if( (aSegStart.x += temp) m_xcliphi ) +if( (aSegStart.x += temp) = m_xcliphi ) { WHEN_OUTSIDE; } @@ -1087,7 +1087,7 @@ temp = USCALE( (aSegEnd.x - aSegStart.x), (aSegEnd.y - m_ycliphi), (aSegEnd.y - aSegStart.y) ); -if( (aSegEnd.x -= temp) m_xcliplo ) +if( (aSegEnd.x -= temp) = m_xcliplo ) { WHEN_OUTSIDE; } @@ -1116,7 +1116,7 @@ } else { -if( (aSegStart.y m_ycliplo) || (aSegEnd.y m_ycliphi) ) +if( (aSegStart.y = m_ycliplo) || (aSegEnd.y = m_ycliphi) ) { WHEN_OUTSIDE; } @@ -1126,7 +1126,7 @@ temp = USCALE( (aSegEnd.x - aSegStart.x), (aSegStart.y - m_ycliphi), (aSegStart.y - aSegEnd.y) ); -if( (aSegStart.x += temp) m_xcliphi ) +if( (aSegStart.x += temp) = m_xcliphi ) { WHEN_OUTSIDE; } @@ -1140,7 +1140,7 @@ temp = USCALE( (aSegEnd.x - aSegStart.x), (m_ycliplo - aSegEnd.y), (aSegStart.y - aSegEnd.y) ); -if( (aSegEnd.x -= temp) m_xcliplo ) +if( (aSegEnd.x -= temp) = m_xcliplo ) { WHEN_OUTSIDE; } @@ -1168,10 +1168,10 @@ } } -if( ( (aSegEnd.x + aSegStart.x) / 2 = m_xcliphi ) -( (aSegEnd.x + aSegStart.x) / 2 = m_xcliplo ) \ -( (aSegEnd.y + aSegStart.y) / 2 = m_ycliphi ) -( (aSegEnd.y + aSegStart.y) / 2 = m_ycliplo ) ) +if( ( (aSegEnd.x + aSegStart.x) / 2 m_xcliphi ) +( (aSegEnd.x + aSegStart.x) / 2 m_xcliplo ) +( (aSegEnd.y + aSegStart.y) / 2 m_ycliphi ) +( (aSegEnd.y + aSegStart.y) / 2 m_ycliplo ) ) { return false; } ___ 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
[Kicad-developers] [patch] Clang warning removal
HI, Here is a patch to remove some Clang warnings. Camille kicad-warning.diff Description: Binary data ___ 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
[Kicad-developers] parameterized footprint
Hi, is it possible to use parameterized footprints? Instead of choosing between connheader_1, _2 and so on, it should be possible to select or autoselect the connheader(NBR_OF_PINS). So the pins are runtime generated by the python api. Also pinwidth, pinheigt etc. should be parametericed. With openscad AMF version integration, it should be possible to auto generate the 3d-model. Thanks Stefan Helmert ___ 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
Re: [Kicad-developers] Compiling on Fedora 20
Hello: On Mon, Nov 25, 2013 at 8:15 PM, Bryant acutia...@outlook.com wrote: Cesar, Thanks for responding quickly and directly to me. Well you're welcome, but my intention was to help, and I do not notice that I just reply to you. I've since filed a bug for Fedora against bzrtools [ https://bugzilla.redhat.com/show_bug.cgi?id=1034498], do you know if bzrtools is actively maintained or what the issue is with this compatibility fix and mainlining it? Are you running on a Debian-based distro with bzrtools directly in their repos or did you build it from source with this fix in it? Bryant I am running Slackware. if you have bzr installed, bzrtools should works. you just need to: 1. use this command : bzr branch lp:~andrewsomething/bzrtools/kill_get_ancestry 2. move the directory kill_get_ancestry into ~/.bazaar/plugins/ and rename it to bzrtools so you should have a path like this: /home/{your user}/.bazaar/plugins/bzrtools. I hope that I am clear enough. and you should use that branch because is the revision which fix the compatibility with bzr 2.6 because the official bzrtools apparently stops in bzr 2.5. well if I did not make it clear just tell me. Another thing, I suggest that when use the command make use it with out any -j, I mean not make -j4 or make -j3 just use make, because the flag -j4 means that if you have 4 cores in your CPU is going to use each one to make simultaneously different process of the compilation process, so for example one core is going to download boost (which is one of the first things that is make in the compilation process) and the other core is going to start to compile, and if for some reason your download does not finish before the package is needed in the compilation process you are going to have ERROR's, so just use make alone without any -j2 or -j4, like a precaution. well this is my 0.2 cents, I hope works for you. On 11/24/2013 07:15 PM, Cesar Rodriguez wrote: Hello acutiator /m/B/P/k/build make [ 0%] Performing patch step for 'boost' Plugin Bzrtools is not up to date with installed Bazaar version 2.6.0. There should be a newer version of Bzrtools available, e.g. 2.6. bzr: ERROR: Error invoking patch: No such file or directory make[2]: *** [../.downloads-by-cmake/boost_1_54_0/src/boost-stamp/boost-patch] Error 3 make[1]: *** [CMakeFiles/boost.dir/all] Error 2 make: *** [all] Error 2 1. It looks like this problem was that `patch` isn't installed as part of the Fedora build tools package. Can this be added to the cmake prereq checking process at the start. Is not patch the command /usr/bin/patch, you can just try in a terminal to run the patch command and is going to be there, the problem is that you need to install the package bzrtools : this is the url : https://code.launchpad.net/bzrtools, specifically this revision which fix the compatibility with bzr 2.6 here it is: https://code.launchpad.net/~andrewsomething/bzrtools/kill_get_ancestry. So bzr is one package and bzrtools is another one, this second are plugins for the first (bzr), and the command patch that the compilation is looking for is the command bzr patch, I mean patch the plugin. Look in the web of bzrtools for how to install. 2. So my questions are, is the bzrtools version mismatch a problem? I get these warnings a bunch. I am not sure but if you install the bzrtools with the compatibility revision is going to works. 3. What is the process for modifying the Building KiCAD pages on the wiki at kicad-pcb.org? On the FAQ at kicad-pcb.org it mentions that one should edit the wiki at SourceForge, which is currently down. Where and how can I add instructions for building KiCAD on Fedora? I can't help here. 4. Since I already have this email going, is there any desire to have something like a list of easy bugs/features for newbies to tackle? This is something that has been incredibly successful for LibreOffice in recruiting new developers [ https://wiki.documentfoundation.org/Development/Easy_Hacks]. Mesa has also adopted this strategy and it seems to be working based on the mailing list activity [http://wiki.freedesktop.org/dri/NewbieProjects/]. Would it be worthwhile to compile a list of easy hacks for new comers to start with? I agree, some times the project looks so big and complicated that you feel intimidate. And you want to help but you don't want to expend to much time. Plus I prefer not to post newbie questions is this kind of mailing list because I feel that I am wasting time of the developers, and the mailing list of users usually are not for That kind of questions. Bryant ___ 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 Cesar ___
Re: [Kicad-developers] parameterized footprint
On 11/26/2013 8:42 AM, Stefan Helmert wrote: Hi, is it possible to use parameterized footprints? Instead of choosing between connheader_1, _2 and so on, it should be possible to select or autoselect the connheader(NBR_OF_PINS). So the pins are runtime generated by the python api. Also pinwidth, pinheigt etc. should be parametericed. With openscad AMF version integration, it should be possible to auto generate the 3d-model. Thanks Stefan Helmert Yes, it should be possible to generate footprints and 3D models parametrically using Python scripting. All that is required is the manpower write, debug, test, and document the code. ___ 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