kicad-developers team mailing list archive
-
kicad-developers team
-
Mailing list archive
-
Message #41756
Re: [PATCH] Board statistics dialog
>>>> About the weight estimation of the pcb, considering that in the (probably near) future a board stackup definition with copper thickness and dielectric properties will be a part of pcbnew, the weight calculation as another data of the statistics window will become possible, once the density of the materials is one of the columns that define the stackup.
>>Sounds nice. Not sure whether it may be too complex, though.
Maybe that's not too bad, as far as I remember, copper layers are polygons with get area method already implemented. But for sure that will take hours for debug.
>> By the way, a statistics report like the one of pcbnew, with number of nets and number of components would be useful also in eeschema. Its typical usage would be to estimate he complexity (and cost) of pcb routing. I'm asking myself if Alexander's code can be extended to be used also in eeschema, so that we can have an almost identical "statistics" window there with minimal effort and consistent interface.
If we will understand what should be in eeschema statistics dialog, I can do that as well. Maybe they can even use one parent class...
It's probably can show pads number as well... But what else?
>
>On Mon, 29 Jul 2019, 21:19 Dino Ghilardi, < dino.ghilardi@xxxxxxxx > wrote:
>>Hi,
>>
>>About the weight estimation of the pcb, considering that in the (probably near) future a board stackup definition with copper thickness and dielectric properties will be a part of pcbnew, the weight calculation as another data of the statistics window will become possible, once the density of the materials is one of the columns that define the stackup.
>>
>>By the way, a statistics report like the one of pcbnew, with number of nets and number of components would be useful also in eeschema. Its typical usage would be to estimate he complexity (and cost) of pcb routing. I'm asking myself if Alexander's code can be extended to be used also in eeschema, so that we can have an almost identical "statistics" window there with minimal effort and consistent interface.
>>
>>Cheers,
>>Dino.
>>
>>Il Lun 29 Lug 2019 20:24 Diego Herranz < diegoherranz@xxxxxxxxxxxxxxxx > ha scritto:
>>>I agree both are useful.
>>>(Max width x Max height) area is useful as a worst case scenario for manufacturing: it may end up being better depending on the shape of the board and panel design.
>>>Regarding actual area, I'm working on a project right now where I need to provide an estimation of the weight of the board. Knowing the actual area of FR4 is useful.
>>>
>>>Thanks!
>>>
>>>
>>>
>>>On Mon, 29 Jul 2019 at 14:33, Wayne Stambaugh < stambaughw@xxxxxxxxx > wrote:
>>>>I agree. There is utility in both the actual area of a board and the
>>>>manufacturing area. The latter should be fairly trivial to implement.
>>>>
>>>>Cheers,
>>>>
>>>>Wayne
>>>>
>>>>On 7/29/19 9:30 AM, Clemens Koller wrote:
>>>>> Hi!
>>>>> I think it could be good to see both:
>>>>> - The actual PCB area of the outline (well, without drills).
>>>>> - The max-width * max-height which is usually what you have to pay for when you get it manufactured.
>>>>> The second one could be also an interesting task to calculate if you have an odd shaped polygonal outline.
>>>>>
>>>>> Regards,
>>>>> Clemens
>>>>>
>>>>>
>>>>> On 29/07/2019 14.43, Alexander Shuklin wrote:
>>>>>> Hi! I've been asked to do actually PCB area calculation. Since English is not my first language, maybe I just miss-understood. Do you mean, that area has to be just max width * max height? I never seen that, but there's a message in thread about sometimes you need proper area.
>>>>>> I utilized kicad outline functions for that.
>>>>>>
>>>>>>
>>>>>> Понедельник, 29 июля 2019, 15:35 +03:00 от Mark Roszko < mark.roszko@xxxxxxxxx >:
>>>>>>
>>>>>> Huh, looking at the statistics code, it actually tries and find the more "detailed area" of a board based on any polygonal outline.
>>>>>> Is there any value in it this way? PCB manufacturing charges are generally per-square area because ultimately the price is on panel space you are using.
>>>>>>
>>>>>> On Sat, Jul 27, 2019 at 5:07 AM Diego Herranz < diegoherranz@xxxxxxxxxxxxxxxx <// e.mail.ru/compose/?mailto=mailto%3adiegoherranz@xxxxxxxxxxxxxxxx >> wrote:
>>>>>>
>>>>>> I've been testing this dialog and I think it is a nice addition. Thanks!
>>>>>>
>>>>>> There seems to be something wrong with the area calculation, though. See image below:
>>>>>> area.png
>>>>>>
>>>>>> Thanks,
>>>>>> Diego
>>>>>>
>>>>>> On Tue, 23 Jul 2019 at 11:18, Ian McInerney < Ian.S.McInerney@xxxxxxxx <// e.mail.ru/compose/?mailto=mailto%3aIan.S.McInerney@xxxxxxxx >> wrote:
>>>>>>
>>>>>> Alexander,
>>>>>>
>>>>>> Instead of declaring the 2 static variables separately, I would suggest creating a struct for the settings then store that as the static variable. For an example of this see the dialog_create_array.cpp file. This way if any new options must be added in the future, they can just be added to the struct very easily.
>>>>>>
>>>>>> -Ian
>>>>>>
>>>>>> On Mon, Jul 22, 2019 at 9:39 PM Alexander Shuklin < jasuramme@xxxxxxx <// e.mail.ru/compose/?mailto=mailto%3ajasuramme@xxxxxxx >> wrote:
>>>>>>
>>>>>> Damn ><,
>>>>>> don't use last patch, please.
>>>>>> It doesn't count total vias amount. Use this one.
>>>>>>
>>>>>>
>>>>>> Понедельник, 22 июля 2019, 22:14 +03:00 от Alexander Shuklin < jasuramme@xxxxxxx <// e.mail.ru/compose/?mailto=mailto%3ajasuramme@xxxxxxx >>:
>>>>>>
>>>>>> Hi,
>>>>>> thanks for sharing experience, as I never used that translations or wxWidgets before. And I have no idea where else could I get that information. ))
>>>>>> So, there's the patch with vias information and some tiny improvements.
>>>>>>
>>>>>>
>>>>>> Понедельник, 22 июля 2019, 13:34 +03:00 от Ian McInerney < ian.s.mcinerney@xxxxxxxx <// e.mail.ru/compose/?mailto=mailto%3aian.s.mcinerney@xxxxxxxx >>:
>>>>>>
>>>>>>
>>>>>>
>>>>>> On Mon, Jul 22, 2019 at 11:03 AM Dino Ghilardi < dino.ghilardi@xxxxxxxx < http://e.mail.ru/compose/?mailto=mailto%3adino.ghilardi@xxxxxxxx >> wrote:
>>>>>>
>>>>>> Hi Alexander,
>>>>>>
>>>>>> One possible solution for the translation could be put the ":" in a
>>>>>> different column of the table and right-align the field description text
>>>>>> (so all the colons will be aligned). A rapid google search shown that in
>>>>>> French and Vietnamese there should be a space before the colon, while in
>>>>>> the rest of the world there is not, so having the translation for the
>>>>>> ":" word seems to make sense. Also another question arises: Is there
>>>>>> some language in which the colon should be another character before the
>>>>>> word? (I'm thinking about spanish where the question mark upside-down
>>>>>> appears before a question...)? ...conclusion: keeping "Height:" and
>>>>>> "Height" as two different words seem to be the solution that gives
>>>>>> maximum flexibility to translators.
>>>>>>
>>>>>>
>>>>>> This actually doesn't give them as much flexibility. When translations are done, they need to examine the entire string that needs translating, so the ":" character should be included in the string. Separating out the two portions is the equivalent of saying that every lanugage will follow the same compositional rules.
>>>>>>
>>>>>>
>>>>>> Another possible solution (probably better then the one above since it
>>>>>> just removes the problem) is to remove the ":" and have the cell borders
>>>>>> in a different color, just like the tables in the "board setup" dialog
>>>>>> (so that you can also take a look at that code to solve also the color
>>>>>> problem seeing how it was solved there). The advantage of this approach
>>>>>> is also having a more consistent "look" through all the dialogs.
>>>>>>
>>>>>>
>>>>>>
>>>>>> P.S. (a little bit off-topic):
>>>>>> If you move the statistic window and check/uncheck one of the checkboxes
>>>>>> ("subctract holes...." or "Exclude components...") the window "jumps" to
>>>>>> the center of the screen (its default position on open): do you have
>>>>>> also this behaviour or it is just on my debian-linux with gtk3?
>>>>>>
>>>>>>
>>>>>> Cheers,
>>>>>> Dino.
>>>>>>
>>>>>> On 22/07/19 10:13, Alexander Shuklin wrote:
>>>>>> > Hi!
>>>>>> > I'll have a look to add vias count to dialog.
>>>>>> > There's some questions:
>>>>>> >
>>>>>> > 1)I don't have too much experience with wxdialogs. There was commit on
>>>>>> > master, which says:
>>>>>> > >> remove settings for fg/bg color: the result is unpredictable: was
>>>>>> > black texts on black background on my computer.
>>>>>> > And now I have all tables with data just in white boxes. Is it how it
>>>>>> > meant to be, or just some misbehavior on different systems? I use
>>>>>> > archlinux x64 OS.
>>>>>> > there's screenshot in attachment
>>>>>> >
>>>>>> > 2) Can we use something like _( "Height" ) + ":" for translation, not _(
>>>>>> > "Height:" )? As far as I understand, now we will need to have 2
>>>>>> > translations, first for "Height" and second for "Height:" but that's
>>>>>> > basically same word.
>>>>>> >
>>>>>> > Воскресенье, 21 июля 2019, 23:42 +03:00 от Dino Ghilardi
>>>>>> > < dino.ghilardi@xxxxxxxx < http://e.mail.ru/compose/?mailto=mailto%3adino.ghilardi@xxxxxxxx >>:
>>>>>> >
>>>>>> > Makes sense.
>>>>>> > Instead of a generic "via count" a more complete table similar to the
>>>>>> > one generated in the drill report file could be useful, but may be it
>>>>>> > can became quite long if a lot of different drill sizes are used (ok,
>>>>>> > scrollbars are made to handle that).
>>>>>> > Also having "vias", "blind vias" and "microvias" count man make sense
>>>>>> > (or at least having something like "microvias used: yes/no"), just to
>>>>>> > have in board statistics the information about the need of an advanced
>>>>>> > pcb manufacturing process.
>>>>>> >
>>>>>> >
>>>>>> > Cheers,
>>>>>> > Dino.
>>>>>> >
>>>>>> >
>>>>>> > On 21/07/19 20:54, Mark Roszko wrote:
>>>>>> > > > Since making every hole in the pcb costs time, manufacturers
>>>>>> > > calculate the price of the PCB using also that number.
>>>>>> > >
>>>>>> > > A long time ago, holes cost alot. These days if your manufacturer is
>>>>>> > > charging alot per hole, you should run far away. Usually
>>>>>> > manufactuers
>>>>>> > > include 20k-40k holes in the base price per panel before they start
>>>>>> > > charging you tiny penny amounts for more in some increments of
>>>>>> > > thousands. The CNC machines these days as blazing fast at making the
>>>>>> > > holes required and they charge more for the drill bit being worn
>>>>>> > down
>>>>>> > > than the time.
>>>>>> > >
>>>>>> > > What does actually cost money is via type and size. Blind vias make
>>>>>> > > layer stackups a pain in the butt and micro vias needing lasers.
>>>>>> > > And also going below some via size can significantly add cost
>>>>>> > even if
>>>>>> > > not at microvia size because it requires different machines with
>>>>>> > more
>>>>>> > > precision and smaller drill bits.
>>>>>> > >
>>>>>> > >
>>>>>> > > If anything I would say to break down the statistics based on via
>>>>>> > type.
>>>>>> > >
>>>>>> > > On Sun, Jul 21, 2019 at 1:55 PM Dino Ghilardi
>>>>>> > < dino.ghilardi@xxxxxxxx < http://e.mail.ru/compose/?mailto=mailto%3adino.ghilardi@xxxxxxxx > <mailto: dino.ghilardi@xxxxxxxx < http://e.mail.ru/compose/?mailto=mailto%3adino.ghilardi@xxxxxxxx >>
>>>>>> > > <mailto: dino.ghilardi@xxxxxxxx < http://e.mail.ru/compose/?mailto=mailto%3adino.ghilardi@xxxxxxxx >>> wrote:
>>>>>> > >
>>>>>> > > I just tried the board statistics dialog and looks good, I like it.
>>>>>> > >
>>>>>> > > A thing I'd like to have to make it better is adding the number
>>>>>> > of vias
>>>>>> > > to the statistics: Since making every hole in the pcb costs time,
>>>>>> > > manufacturers calculate the price of the PCB using also that number.
>>>>>> > >
>>>>>> > > Also the option to save or print a text with the statistics report
>>>>>> > > would
>>>>>> > > be nice.
>>>>>> > >
>>>>>> > >
>>>>>> > > Cheers,
>>>>>> > > Dino.
>>>>>> > >
>>>>>> >
>>>>>> > _______________________________________________
>>>>>> > Mailing list: https://launchpad.net/~kicad-developers
>>>>>> > Post to : kicad-developers@xxxxxxxxxxxxxxxxxxx < http://e.mail.ru/compose/?mailto=mailto%3akicad%2ddevelopers@xxxxxxxxxxxxxxxxxxx >
>>>>>> > <mailto: kicad-developers@xxxxxxxxxxxxxxxxxxx < http://e.mail.ru/compose/?mailto=mailto%3akicad%2ddevelopers@xxxxxxxxxxxxxxxxxxx >>
>>>>>> > Unsubscribe : https://launchpad.net/~kicad-developers
>>>>>> > More help : https://help.launchpad.net/ListHelp
>>>>>> >
>>>>>> >
>>>>>> >
>>>>>> > --
>>>>>> > Alexander Shuklin
>>>>>>
>>>>>>
>>>>>> _______________________________________________
>>>>>> Mailing list: https://launchpad.net/~kicad-developers
>>>>>> Post to : kicad-developers@xxxxxxxxxxxxxxxxxxx < http://e.mail.ru/compose/?mailto=mailto%3akicad%2ddevelopers@xxxxxxxxxxxxxxxxxxx >
>>>>>> Unsubscribe : https://launchpad.net/~kicad-developers
>>>>>> More help : https://help.launchpad.net/ListHelp
>>>>>>
>>>>>>
>>>>>>
>>>>>> --
>>>>>> Alexander Shuklin
>>>>>>
>>>>>>
>>>>>>
>>>>>> --
>>>>>> Alexander Shuklin
>>>>>>
>>>>>> _______________________________________________
>>>>>> Mailing list: https://launchpad.net/~kicad-developers
>>>>>> Post to : kicad-developers@xxxxxxxxxxxxxxxxxxx <// e.mail.ru/compose/?mailto=mailto%3akicad%2ddevelopers@xxxxxxxxxxxxxxxxxxx >
>>>>>> Unsubscribe : https://launchpad.net/~kicad-developers
>>>>>> More help : https://help.launchpad.net/ListHelp
>>>>>>
>>>>>> _______________________________________________
>>>>>> Mailing list: https://launchpad.net/~kicad-developers
>>>>>> Post to : kicad-developers@xxxxxxxxxxxxxxxxxxx <// e.mail.ru/compose/?mailto=mailto%3akicad%2ddevelopers@xxxxxxxxxxxxxxxxxxx >
>>>>>> Unsubscribe : https://launchpad.net/~kicad-developers
>>>>>> More help : https://help.launchpad.net/ListHelp
>>>>>>
>>>>>>
>>>>>>
>>>>>> --
>>>>>> Mark
>>>>>> _______________________________________________
>>>>>> Mailing list: https://launchpad.net/~kicad-developers
>>>>>> Post to : kicad-developers@xxxxxxxxxxxxxxxxxxx <mailto: kicad-developers@xxxxxxxxxxxxxxxxxxx >
>>>>>> Unsubscribe : https://launchpad.net/~kicad-developers
>>>>>> More help : https://help.launchpad.net/ListHelp
>>>>>>
>>>>>>
>>>>>>
>>>>>> --
>>>>>> Alexander Shuklin
>>>>>>
>>>>>> _______________________________________________
>>>>>> Mailing list: https://launchpad.net/~kicad-developers
>>>>>> Post to : kicad-developers@xxxxxxxxxxxxxxxxxxx
>>>>>> Unsubscribe : https://launchpad.net/~kicad-developers
>>>>>> More help : https://help.launchpad.net/ListHelp
>>>>>>
>>>>>
>>>>> _______________________________________________
>>>>> Mailing list: https://launchpad.net/~kicad-developers
>>>>> Post to : kicad-developers@xxxxxxxxxxxxxxxxxxx
>>>>> Unsubscribe : https://launchpad.net/~kicad-developers
>>>>> More help : https://help.launchpad.net/ListHelp
>>>>>
>>>>
>>>>_______________________________________________
>>>>Mailing list: https://launchpad.net/~kicad-developers
>>>>Post to : kicad-developers@xxxxxxxxxxxxxxxxxxx
>>>>Unsubscribe : https://launchpad.net/~kicad-developers
>>>>More help : https://help.launchpad.net/ListHelp
>>>_______________________________________________
>>>Mailing list: https://launchpad.net/~kicad-developers
>>>Post to : kicad-developers@xxxxxxxxxxxxxxxxxxx
>>>Unsubscribe : https://launchpad.net/~kicad-developers
>>>More help : https://help.launchpad.net/ListHelp
>_______________________________________________
>Mailing list: https://launchpad.net/~kicad-developers
>Post to : kicad-developers@xxxxxxxxxxxxxxxxxxx
>Unsubscribe : https://launchpad.net/~kicad-developers
>More help : https://help.launchpad.net/ListHelp
--
Alexander Shuklin
Follow ups
References