Hi David
> I've been rewriting this for an hour, so hopefully it
makes sense.
Only an hour? I usually takes me much longer for such emails. ;-)
But yes, most of this does make sense. I kind of filled in some
gaps with what we discussed in the other thread.
Some thoughts (numbers for easy reference):
Wanted to write more, but gotta go ;-)
_Mark
--
You received this message because you are subscribed to the Google Groups "OpenPnP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to openpnp+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/openpnp/777f93cc-5e2e-4ef8-9b06-f7a653a8da2an%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/openpnp/c7ea3316-2f96-467d-b68e-6280039e5448n%40googlegroups.com.
The writing of this response overlapped with Jason's mail*, so it
does not yet respect that fully. I do agree with Jason that we
should try and separate the topics as far as possible. At the same
time I do see that it may be not so easy, the dependencies are
complex.
*) Earlier writing:
> Part settings kind of sounds like you're describing a
mini Package that you can shuffle around, why not just use
Package? It sounds like you're renaming it to hide it from Jason
No, that's not what I mean. This is about
inheritance/polymorphism, principles that I like very much (I'm
not a fashion victim and no, I don't think OOP is "out", just
because it was not the silver bullet they hyped it to be). Part
Setting could be a "Base class" of Part and Package inasmuch as
both can carry settings that ultimately affect the part. We could
endlessly battle about where which settings should be located and
whether two levels are needed at all. Or we could just let go and
say everybody can choose a setup to their liking. Even the mix is
possible, with an optional override logic. In my professional
life I have ample very positive experience with that settings
inheritance pattern in much more complex hierarchies. After some
getting used to, users love its power.
> it feels like it would generate a tremendous amount of tangled business logic
I don't think so. Essentially I have implemented as much in the
ReferencePushPullFeeder class, where you can mark one feeder as a
template and based on its Package (there is even a second level to
further group Packages called "Tape Specification") it will then
serve as the blueprint for the other feeders. You can also
re-clone the settings, after you change the template. This is a
less formal embodiment of essentially the same pattern.
https://makr.zone/openpnp-new-referencepushpullfeeder/393/
This way (and thanks to OCR) you can create a new feeder with one
click:
https://youtu.be/5QcJ2ziIJ14?t=295
Further into the video you see the cloning in effect.
https://youtu.be/5QcJ2ziIJ14?t=474
The envisioned relationships and cloning operations between
Packages/Parts and Library/Jobs would be very similar. At least to
my standards this is in no way "a tremendous amount of tangled
business logic" ;-)
_Mark
To view this discussion on the web visit https://groups.google.com/d/msgid/openpnp/c7ea3316-2f96-467d-b68e-6280039e5448n%40googlegroups.com.
Sorry the second video timestamp was wrong:
Should have been
"Further into the video you see the cloning in effect."
To view this discussion on the web visit https://groups.google.com/d/msgid/openpnp/d62c2a04-fe00-a5b6-7f18-85ee58117b4c%40makr.zone.
@Jason:Absolutely agree lol, I pruned back everything I could in the first post to try to follow your post in the other thread about gradually introducing changesScope-wise, I really just want to concern myself with the PartAlignment interface/ui stuff in the first post, it shouldn't hurt anyone and would make it easier for people to experiment with different implementations. Even the LeadGroup part isn't necessary but it was a cool shiny thing.>> Footprint is a misnomer and it should go away and/or be changed to exactly what is being described here. I never meant for it to have anything to do with PCB lands. It is intended to represent the parts/packages/chips/components/etc, not the PCB. So, yes, please replace/supplant Footprint.Cool cool, though I can't think of a proper name to encapsulate LeadGroups or Leads lol. Is "Outline" too obscure? Taken from SOIC, SOT, etc
>> It's not clear to me where the ReferenceQFPAlignment, ReferenceChipAlignment, etc. fit in the vision system. Are these essentially subclasses of BottomVision? i.e. are they responsible for performing the vision operation, moving the head around, taking pictures, etc. or are they just for describing the part in such a way that ReferenceBottomVision can align it properly?Subclasses yes or other derivatives of PartAlignment. Some components types are better suited for different alignment methods, different cameras, etc. From the code it looks like that was already the intention to extend it this way (minus the different camera part). I don't really see this as a big change but since its changing some methods and interfaces I called it a refactoring.
> but is the idea that these would be very light
subclasses? Mostly I just don't want to see a bunch of code in
ReferenceBottomVision duplicated.
In a perfect world, I think ReferenceBottomVision (or
something similar but new) would just identify leads and try to
match them to a given Package's leads. Maybe subclasses would
provide "smarter" matching, but the vision operations would be
the same, I think.
I do see a larger variety but that's not a problem IMHO, as we
can do both: light subclasses and completely new
implementations of the interface. Also there can be new abstract
base classes inserted above ReferenceBottomVision to
cover common settings & code, such as the pre-rotate option
and multi-pass centering.
These are the variants on my radar:
There would be three different pipelines involved.
It might even be feasible in the future to do some clamp or
laser/LIDAR alignment that involves no vision at all. The
interface should be completely agnostic there.
_Mark
--
You received this message because you are subscribed to the Google Groups "OpenPnP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to openpnp+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/openpnp/CA%2BQw0jyebAn%2BR%2BtU1ym-f5H5kpuA9Nh379W%3D%3Dqs3M8fD928f9Q%40mail.gmail.com.